Skip to content

SpaceDelimitedScopeProvider

league/oauth2-client’s AbstractProvider::getScopeSeparator() returns a comma and GenericProvider does not override it, so a multi-scope authorization request comes out as scope=openid%2Cprofile%2Cemail.

RFC 6749 §3.3 defines scope as a space-delimited list, and real authorization servers (Google, Microsoft Entra ID, Okta) either reject the comma form or parse it as a single unknown scope. The failure surfaces at the provider’s authorize endpoint, after the redirect has left this app — about the worst place to debug it — so the separator is corrected here rather than left to each caller to pre-join.

final class SpaceDelimitedScopeProvider extends GenericProvider

ExtendsGenericProvider
Since3.0.2
SourceSpaceDelimitedScopeProvider.php

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
authorize()AbstractProviderRedirects the client for authorization.
getAccessToken()AbstractProviderRequests an access token using a specified grant and option set.
getAuthenticatedRequest()AbstractProviderReturns an authenticated PSR-7 request instance.
getAuthorizationUrl()AbstractProviderBuilds the authorization URL.
getBaseAccessTokenUrl()GenericProvider
getBaseAuthorizationUrl()GenericProvider
getDefaultScopes()GenericProvider
getGrantFactory()AbstractProviderReturns the current grant factory instance.
getGuarded()AbstractProviderReturns current guarded properties.
getHeaders()AbstractProviderReturns all headers used by this provider for a request.
getHttpClient()AbstractProviderReturns the HTTP client instance.
getOptionProvider()AbstractProviderReturns the option provider instance.
getParsedResponse()AbstractProviderSends a request and returns the parsed response.
getPkceCode()AbstractProviderReturns the current value of the pkceCode parameter.
getRequest()AbstractProviderReturns a PSR-7 request instance that is not authenticated.
getRequestFactory()AbstractProviderReturns the request factory instance.
getResourceOwner()AbstractProviderRequests and returns the resource owner of given access token.
getResourceOwnerDetailsUrl()GenericProvider
getResponse()AbstractProviderSends a request instance and returns a response instance.
getState()AbstractProviderReturns the current value of the state parameter.
isGuarded()AbstractProviderDetermines if the given property is guarded.
setGrantFactory()AbstractProviderSets the grant factory instance.
setHttpClient()AbstractProviderSets the HTTP client instance.
setOptionProvider()AbstractProviderSets the option provider instance.
setPkceCode()AbstractProviderSet the value of the pkceCode parameter.
setRequestFactory()AbstractProviderSets the request factory instance.