LoadConfig class
Description
Class that loads the configuration of the Client stored in the clientConfig.xml file.
Class Variables
- String assertion_type: Type of the assertion (Defined by the constants PAPI or SAML2). By default PAPI.
- String client_id: Client Identification
- String client_secret: Client Shared Secret
- String error-type: Error type.
- String as: Authorization Server URL.
- String rs: Resource Server URL.
- String request_type: Type of request that the Client makes to the Resource Server.
- String grant_type: The The access grant type included in the request. In this library the type must be "assertion".
- String $debug_active_client: True if the debug is active. False if it's not active.
- String format_classes: The name of the IFormattingResources classes declared by the user.
- String scope: Scope of the request.
- String format_archive_names: The url of the IFormattingResources classes declared by the user.
Methods
OAuth __construct ([ $dir = ""])
Public OAuth Class Constructor.
- String dir: Client configuration directory
Return an OAuth Object
PRIVATE loadFile($file): boolean
Function that loads the Client App configuration of the clientConfig.xml and provide access to the configuration values.
- String file: Client configuration file
PUBLIC getFormatArchiveName($scope): string
Function that returns the archive name of the class that implements the formatting method for this scope.
PUBLIC getFormatClass($scope): string
Function that returns the class name that implements the formatting method for this scope.
PUBLIC hasFormatClass($scope): boolean
Function that returns if exists a class name that implements the formatting method for this scope.
PUBLIC hasFormatArchiveName($scope): boolean
Function that returns if exists a class archive name that implements the formatting method for this scope.
PUBLIC get_as(): string
Returns the Authorization Server URL.
PUBLIC get_assertion_type(): string
Returns the type of the assertion. It could be PAPI or SAML2.
PUBLIC get_client_id(): string
Returns the Client Identificator.
PUBLIC get_client_secret(): string
Returns the Client Secret.
PUBLIC get_debug_active_client(): boolean
Returns the value of the debug_active parameter of the configuration.
PUBLIC get_scope(): string
Returns the default_scope.
PUBLIC get_error_type(): string
Returns the error type.
PUBLIC get_grant_type(): string
Returns the grant_type.
PUBLIC get_request_type(): string
Returns the request type.
PUBLIC get_rs(): string
Returns the resource server URL.
PUBLIC get_scope(): string
Returns the scope.
PUBLIC getFormatClass(scope): string
Returns the class related to that scope.
PUBLIC getFormatArchiveName(scope): string
Returns the path related to that scope.
PUBLIC hasFormatClass(scope): boolean
Returns TRUE if exists a class related to that scope.
PUBLIC hasFormatArchiveName(scope): boolean
Returns TRUE if exists a path related to that scope.
PUBLIC get_debug_active_client(): boolean
Returns if the debug is active for the client application.