VuFind API Documentation

OAuth2ControllerFactory extends AbstractBaseFactory
in package

OAuth2 controller factory.

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Table of Contents

$claimExtractor  : ClaimExtractor
Claim extractor
$container  : ContainerInterface
Service manager
$oauth2Config  : array<string|int, mixed>
OAuth2 configuration
$pathResolver  : PathResolver
Config file path resolver
__invoke()  : object
Create an object
addGrantTypes()  : void
Add grant types to the server
applyPermissions()  : AbstractBase
Apply permission settings to the controller.
checkIfUserIdentifierFieldIsValid()  : void
Check that the user identifier field is valid.
createAuthCodeGrant()  : AuthCodeGrant
Create an auth code grant
createRefreshTokenGrant()  : RefreshTokenGrant
Create a refresh token grant
getAuthorizationServerFactory()  : callable
Return a factory function for creating the authorization server.
getClaimExtractor()  : ClaimExtractor
Get the claim extractor.
getKeyFromConfigPath()  : CryptKey
Return a key path from the OAuth2 configuration.
getOAuth2ServerSetting()  : string
Return a server setting from the OAuth2 configuration.
getResourceServerFactory()  : callable
Return a ResourceServer.
getResponseType()  : ResponseTypeInterface
Return an OAuth2 response type.

Properties

Methods

__invoke()

Create an object

public __invoke(ContainerInterface $container, string $requestedName[, null|array<string|int, mixed> $options = null ]) : object
Parameters
$container : ContainerInterface

Service manager

$requestedName : string

Service being created

$options : null|array<string|int, mixed> = null

Extra options (optional)

Tags
throws
ServiceNotFoundException

if unable to resolve the service.

throws
ServiceNotCreatedException

if an exception is raised when creating a service.

throws
ContainerExceptionInterface|Throwable

if any other error occurs

Return values
object

addGrantTypes()

Add grant types to the server

protected addGrantTypes(AuthorizationServer $server, array<string|int, mixed>|null $clientConfig) : void
Parameters
$server : AuthorizationServer

Authorization server

$clientConfig : array<string|int, mixed>|null

Client configuration

Return values
void

checkIfUserIdentifierFieldIsValid()

Check that the user identifier field is valid.

protected checkIfUserIdentifierFieldIsValid() : void
Tags
throws
Exception

if the field is invalid

Return values
void

createAuthCodeGrant()

Create an auth code grant

protected createAuthCodeGrant(array<string|int, mixed>|null $clientConfig) : AuthCodeGrant
Parameters
$clientConfig : array<string|int, mixed>|null

Client configuration

Return values
AuthCodeGrant

createRefreshTokenGrant()

Create a refresh token grant

protected createRefreshTokenGrant() : RefreshTokenGrant
Return values
RefreshTokenGrant

getAuthorizationServerFactory()

Return a factory function for creating the authorization server.

protected getAuthorizationServerFactory() : callable
Return values
callable

getClaimExtractor()

Get the claim extractor.

protected getClaimExtractor() : ClaimExtractor
Return values
ClaimExtractor

getKeyFromConfigPath()

Return a key path from the OAuth2 configuration.

protected getKeyFromConfigPath(string $key) : CryptKey

Converts the path to absolute as necessary.

Parameters
$key : string

Key path to return

Tags
throws
Exception

if the setting doesn't exist or is empty.

Return values
CryptKey

getOAuth2ServerSetting()

Return a server setting from the OAuth2 configuration.

protected getOAuth2ServerSetting(string $setting) : string
Parameters
$setting : string

Setting name

Tags
throws
Exception

if the setting doesn't exist or is empty.

Return values
string

getResourceServerFactory()

Return a ResourceServer.

protected getResourceServerFactory() : callable
Return values
callable

getResponseType()

Return an OAuth2 response type.

protected getResponseType() : ResponseTypeInterface
Return values
ResponseTypeInterface

Search results