OAuth2.Server.Configurationpersistent class OAuth2.Server.Configuration
The authorization server configuration is maintained by the OAuth2.Server.Configuration class. InterSystems supplies an SMP page, %CSP.UI.Portal.OAuth2.Server.Configuration, which configures the OAuth2 server as part of the SMP. It is possible to customize the authorization server by replacing this page by a user written page which maintains the OAuth2.Server.Configuration class instance.
AccessTokenInterval is the interval in seconds after which an access token issued by this server will expire. The default is 3600 seconds.
If AllowUnsupportedScope is true (1), then unsupported scope values will be ignored. Otherwise, an error will be returned.
If AudRequired is true, then an authorization code and implicit requests require the aud property.
AuthenticateClass is the name of a subclass of %OAuth2.Server.Authenticate which will be used to allow override of the DirectLogin, DisplayLogin and DisplayPermissions methods during user authorization.
AuthorizationCodeInterval is the interval in seconds after which an authorization code issued by this server will expire. The default is 60 seconds.
ClientSecretInterval is the interval in seconds after which a client secret will expire. The default value of 0 means the session will not be automatically terminated.
CustomizationNamespace is the namespace where the customization code is to be run.
CustomizationRoles is a comma separated list of roles that are set for any call to user supplied customization code.
DefaultScope is a blank separated list containing the default for access token scope if scope is not specified in the access token request or in the client configuration.
Description is a human readable of this authorization server.
EncryptionAlgorithm specifies the default encryption algorithm used to create JWEs or "" if JWTs are not to be encrypted. EncryptionAlgorithm is used for any client specific algorithm which is not specified. See %OAuth2.JWT for the list of supported algorithms. If EncryptionAlgorithm is specified, KeyAlgorithm must also be specified.
GenerateTokenClass is the name of a class with the same signatures as OAuth2.Server.Generate which overrides the GenerateToken method. The GenerateToken method of OAuth2.Server.AccessToken generates an opaque token consisting of a random number. We will also supply an %OAuth2.Server.JWT subclass of OAuth2.Server.AccessToken which will generate a signed JWT based on the token properties.
IssuerEndpoint is the endpoint for this authorization server.
JWKSFromCredentials is true if the JWKSs were created from ServerCredentials.
This property should never be set directly for configuration.
KeyAlgorithm specifies the default key management algorithm used to create JWEs or "" if JWTs are not to be encrypted. Keylgorithm is used for any client specific algorithm which is not specified. See %OAuth2.JWT for the list of supported algorithms. If KeyAlgorithm is specified, EncryptionAlgorithm must also be specified.
The meta data which describes this authorization server,
RefreshTokenInterval is the interval in seconds after which a refresh token issued by this server will expire. The default is 24 hours = 86400 seconds.
ReturnRefreshToken defines the conditions under which a refresh token is returned along with the access token. This property is a string of multiple condition characters which are OR'ed. "" means only return a RefreshToken as required by OpenID Connect.
- "a" - Always - "c" - Confidential client - "f" - if offline_access scope requested
The name of the activated TLS/SSL configuration to use loading a request object.
Chosen by user during configuration.
ServerCredentials is the alias of the %SYS.X509Credentials object which contains the authoriization server's certificate and private key.
ServerPassword is the password for the private key in ServerCredentials if the password is not in the %SYS.X5009Credentials object
SessionClass is the name of a class with the same signatures as OAuth2.Server.Session which includes GetUser, Login and Logout methods. These methods maintain an OAuth 2.0 session using any appropriate means. The default OAuth2.Session class uses an httpOnly cookie.
SessionInterval is the interval in seconds after which a user session will be automatically terminated. The value 0 means the session will not be automatically terminated. The default is 24 hours = 86400 seconds.
SigningAlgorithm specifies the default signing algorithm used to create JWSs or "" if JWTs are not to be signed. SigningAlgorithm is used for any client specific algorithm which is not specified. See %OAuth2.JWT for the list of supported algorithms.
If SupportSession is true, then OAuth 2.0 user sessions will be supported using the specified SessionClass.
**** Moved to OAuth2.Server.Metadata when dynamic client support introduced
SupportedGrantTypes is the grant types that are supported to create an access token. This property is a string of 1 to 5 characters with one character for each supported grant type as follows:
- "A" - Authorization Code - "I" - Implicit - "P" - Resource Owner Password Credentials - "C" - Client Credentials - "J" - JWT Authorization
SupportedScopes is a %ArrayOfDatatypes which specifies all scopes supported by this Authorization Server. The index for each array element is the scope and the value is the description of the scope for display.
ValidateUserClass is the name of a class with the same signatures as %OAuth2.Server.Validate which may override the ValidateUser method which validates a user and associates a set of properties with this user.
Delete this configuration.
Get server supported algorithms
Open the single OAuth2.Server.Configuration instance.
Rotate the auhtorization server's public/private key pairs by adding a new key pair to the JWKS and saving the JWKS. At this time, all private keys are kept. In the future only a limited set of private keys will be kept.
Save the single OAuth2.Server.Configuration instance. If this is the first time the configuration is saved, the Save method will also create a CSP application for this authorization server. The CSP application will be /csp/oauth2server.
The IDKEY for the singleton configuration class.