(no description)
File Size: | 109 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
auth_server_config_reader:: (4 methods):
__construct()
read_configuration()
validate_uri()
get_configuration_url()
Class: auth_server_config_reader - X-Ref
Simple reader class, allowing OAuth 2 Authorization Server Metadata to be read from an auth server's well-known.__construct(protected http_client $httpclient,protected string $wellknownsuffix = 'oauth-authorization-server') X-Ref |
Constructor. param: http_client $httpclient an http client instance. param: string $wellknownsuffix the well-known suffix, defaulting to 'oauth-authorization-server'. |
read_configuration(\moodle_url $issuerurl) X-Ref |
Read the metadata from the remote host. param: \moodle_url $issuerurl the auth server issuer URL. return: \stdClass the configuration data object. |
validate_uri() X-Ref |
Make sure the base URI is suitable for use in discovery. return: void |
get_configuration_url() X-Ref |
Get the Auth server metadata URL. Per {@link https://www.rfc-editor.org/rfc/rfc8414#section-3}, if the issuer URL contains a path component, the well known suffix is added between the host and path components. return: \moodle_url the full URL to the auth server metadata. |