src/AuthorizationServer.php
public function validateAuthorizationRequest(ServerRequestInterface $request)
    {
        foreach ($this->enabledGrantTypes as $grantType) {
            if ($grantType->canRespondToAuthorizationRequest($request)) {
                return $grantType->validateAuthorizationRequest($request);
            }
        }

        throw OAuthServerException::unsupportedGrantType();
    }
public function validateAuthorizationRequest(ServerRequestInterface $request)
    {
        foreach ($this->enabledGrantTypes as $grantType) {
            if ($grantType->canRespondToAuthorizationRequest($request)) {
                return $grantType->validateAuthorizationRequest($request);
            }
        }

        throw OAuthServerException::unsupportedGrantType();
    }
public function validateAuthorizationRequest ( ServerRequestInterface $ request ) { foreach ( $ this -> enabledGrantTypes as $ grantType ) { if ( $ grantType -> canRespondToAuthorizationRequest ( $ request ) ) { return $ grantType -> validateAuthorizationRequest ( $ request ) ; } } throw OAuthServerException :: unsupportedGrantType ( ) ; }
Validate an authorization request

@param ServerRequestInterface $request

@throws OAuthServerException

@return AuthorizationRequest
Validate an authorization request