Skip to main content

OAuth2.Server.Configuration

persistent class OAuth2.Server.Configuration extends %Library.Persistent

SQL Table Name: 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.

Property Inventory

Method Inventory

Parameters

parameter HTTP200OK = 200 OK;
parameter HTTP500INTERNALSERVERERROR = 500 Internal Server Error;

Properties

property AccessTokenInterval as %Integer (MINVAL = 1) [ InitialExpression = 3600 , Required ];
AccessTokenInterval is the interval in seconds after which an access token issued by this server will expire. The default is 3600 seconds.
Property methods: AccessTokenIntervalDisplayToLogical(), AccessTokenIntervalGet(), AccessTokenIntervalGetStored(), AccessTokenIntervalIsValid(), AccessTokenIntervalLogicalToDisplay(), AccessTokenIntervalNormalize(), AccessTokenIntervalSet()
property AllowPublicClientRefresh as %Boolean [ InitialExpression = 0 ];
If AllowPublicClientRefresh is true, then a clientSecret will NOT be required to process refresh tokens.
Property methods: AllowPublicClientRefreshDisplayToLogical(), AllowPublicClientRefreshGet(), AllowPublicClientRefreshGetStored(), AllowPublicClientRefreshIsValid(), AllowPublicClientRefreshLogicalToDisplay(), AllowPublicClientRefreshNormalize(), AllowPublicClientRefreshSet()
property AllowUnsupportedScope as %Boolean [ InitialExpression = 0 ];
If AllowUnsupportedScope is true (1), then unsupported scope values will be ignored. Otherwise, an error will be returned.
Property methods: AllowUnsupportedScopeDisplayToLogical(), AllowUnsupportedScopeGet(), AllowUnsupportedScopeGetStored(), AllowUnsupportedScopeIsValid(), AllowUnsupportedScopeLogicalToDisplay(), AllowUnsupportedScopeNormalize(), AllowUnsupportedScopeSet()
property AudRequired as %Boolean;
If AudRequired is true, then an authorization code and implicit requests require the aud property.
Property methods: AudRequiredDisplayToLogical(), AudRequiredGet(), AudRequiredGetStored(), AudRequiredIsValid(), AudRequiredLogicalToDisplay(), AudRequiredNormalize(), AudRequiredSet()
property AuthenticateClass as %String (MAXLEN = 256, MINLEN = 1) [ InitialExpression = "%OAuth2.Server.Authenticate" , Required ];
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.
Property methods: AuthenticateClassDisplayToLogical(), AuthenticateClassGet(), AuthenticateClassGetStored(), AuthenticateClassIsValid(), AuthenticateClassLogicalToDisplay(), AuthenticateClassLogicalToOdbc(), AuthenticateClassNormalize(), AuthenticateClassSet()
property AuthorizationCodeInterval as %Integer (MINVAL = 1) [ InitialExpression = 60 , Required ];
AuthorizationCodeInterval is the interval in seconds after which an authorization code issued by this server will expire. The default is 60 seconds.
Property methods: AuthorizationCodeIntervalDisplayToLogical(), AuthorizationCodeIntervalGet(), AuthorizationCodeIntervalGetStored(), AuthorizationCodeIntervalIsValid(), AuthorizationCodeIntervalLogicalToDisplay(), AuthorizationCodeIntervalNormalize(), AuthorizationCodeIntervalSet()
property ClientSecretInterval as %Integer (MINVAL = 0) [ InitialExpression = 0 ];
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.
Property methods: ClientSecretIntervalDisplayToLogical(), ClientSecretIntervalGet(), ClientSecretIntervalGetStored(), ClientSecretIntervalIsValid(), ClientSecretIntervalLogicalToDisplay(), ClientSecretIntervalNormalize(), ClientSecretIntervalSet()
property CustomizationNamespace as %String [ Required ];
CustomizationNamespace is the namespace where the customization code is to be run.
Property methods: CustomizationNamespaceDisplayToLogical(), CustomizationNamespaceGet(), CustomizationNamespaceGetStored(), CustomizationNamespaceIsValid(), CustomizationNamespaceLogicalToDisplay(), CustomizationNamespaceLogicalToOdbc(), CustomizationNamespaceNormalize(), CustomizationNamespaceSet()
property CustomizationRoles as %String (MAXLEN = 1024, MINLEN = 1) [ Required ];
CustomizationRoles is a comma separated list of roles that are set for any call to user supplied customization code.
Property methods: CustomizationRolesDisplayToLogical(), CustomizationRolesGet(), CustomizationRolesGetStored(), CustomizationRolesIsValid(), CustomizationRolesLogicalToDisplay(), CustomizationRolesLogicalToOdbc(), CustomizationRolesNormalize(), CustomizationRolesSet()
property DefaultScope as %String);
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.
Property methods: DefaultScopeDisplayToLogical(), DefaultScopeGet(), DefaultScopeGetStored(), DefaultScopeIsValid(), DefaultScopeLogicalToDisplay(), DefaultScopeLogicalToOdbc(), DefaultScopeNormalize(), DefaultScopeSet()
property Description as %String (MAXLEN = 1024);
Description is a human readable of this authorization server.
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property EncryptionAlgorithm as %String (VALUELIST = ",A128CBC-HS256,A192CBC-HS384,A256CBC-HS512");
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 %Net.JSON.JWA for the list of supported algorithms. If EncryptionAlgorithm is specified, KeyAlgorithm must also be specified.
Property methods: EncryptionAlgorithmDisplayToLogical(), EncryptionAlgorithmGet(), EncryptionAlgorithmGetStored(), EncryptionAlgorithmIsValid(), EncryptionAlgorithmLogicalToDisplay(), EncryptionAlgorithmLogicalToOdbc(), EncryptionAlgorithmNormalize(), EncryptionAlgorithmSet()
property ForcePKCEForConfidentialClients as %Boolean [ InitialExpression = 0 ];
If ForcePKCEForConfidentialClients is true, then authorization and token requests from confidential clients MUST adhere to the Proof Key for Code Exchange (PKCE) specification.
Property methods: ForcePKCEForConfidentialClientsDisplayToLogical(), ForcePKCEForConfidentialClientsGet(), ForcePKCEForConfidentialClientsGetStored(), ForcePKCEForConfidentialClientsIsValid(), ForcePKCEForConfidentialClientsLogicalToDisplay(), ForcePKCEForConfidentialClientsNormalize(), ForcePKCEForConfidentialClientsSet()
property ForcePKCEForPublicClients as %Boolean [ InitialExpression = 0 ];
If ForcePKCEForPublicClients is true, then authorization and token requests from public clients MUST adhere to the Proof Key for Code Exchange (PKCE) specification.
Property methods: ForcePKCEForPublicClientsDisplayToLogical(), ForcePKCEForPublicClientsGet(), ForcePKCEForPublicClientsGetStored(), ForcePKCEForPublicClientsIsValid(), ForcePKCEForPublicClientsLogicalToDisplay(), ForcePKCEForPublicClientsNormalize(), ForcePKCEForPublicClientsSet()
property GenerateTokenClass as %String (MAXLEN = 256, MINLEN = 1) [ InitialExpression = "%OAuth2.Server.Generate" , Required ];
GenerateTokenClass is the name of a class with the same signatures as %OAuth2.Server.Generate which overrides the GenerateToken method. The GenerateToken method must generate an opaque token consisting of a random number. We will also supply a class matching the %OAuth2.Server.Generate interface - %OAuth2.Server.JWT, which will generate a signed JWT based on the token properties.
Property methods: GenerateTokenClassDisplayToLogical(), GenerateTokenClassGet(), GenerateTokenClassGetStored(), GenerateTokenClassIsValid(), GenerateTokenClassLogicalToDisplay(), GenerateTokenClassLogicalToOdbc(), GenerateTokenClassNormalize(), GenerateTokenClassSet()
property IssuerEndpoint as OAuth2.Endpoint [ Required ];
IssuerEndpoint is the endpoint for this authorization server.
Property methods: IssuerEndpointGet(), IssuerEndpointGetObject(), IssuerEndpointGetObjectId(), IssuerEndpointGetStored(), IssuerEndpointGetSwizzled(), IssuerEndpointIsEmpty(), IssuerEndpointIsValid(), IssuerEndpointNewObject(), IssuerEndpointSet(), IssuerEndpointSetObject(), IssuerEndpointSetObjectId(), IssuerEndpointUnSwizzle()
property JWKSFromCredentials as %Boolean [ InitialExpression = 0 ];
JWKSFromCredentials is true if the JWKSs were created from ServerCredentials.
This property should never be set directly for configuration.
Property methods: JWKSFromCredentialsDisplayToLogical(), JWKSFromCredentialsGet(), JWKSFromCredentialsGetStored(), JWKSFromCredentialsIsValid(), JWKSFromCredentialsLogicalToDisplay(), JWKSFromCredentialsNormalize(), JWKSFromCredentialsSet()
property KeyAlgorithm as %String (VALUELIST = ",RSA1_5,RSA-OAEP,A128KW,A192KW,A256KW,dir");
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 %Net.JSON.JWA for the list of supported algorithms. If KeyAlgorithm is specified, EncryptionAlgorithm must also be specified.
Property methods: KeyAlgorithmDisplayToLogical(), KeyAlgorithmGet(), KeyAlgorithmGetStored(), KeyAlgorithmIsValid(), KeyAlgorithmLogicalToDisplay(), KeyAlgorithmLogicalToOdbc(), KeyAlgorithmNormalize(), KeyAlgorithmSet()
property Metadata as OAuth2.Server.Metadata;
The meta data which describes this authorization server,
Property methods: MetadataGet(), MetadataGetObject(), MetadataGetObjectId(), MetadataGetStored(), MetadataGetSwizzled(), MetadataIsValid(), MetadataNewObject(), MetadataSet(), MetadataSetObject(), MetadataSetObjectId(), MetadataUnSwizzle()
property RefreshTokenInterval as %Integer (MINVAL = 1) [ InitialExpression = 86400 , Required ];
RefreshTokenInterval is the interval in seconds after which a refresh token issued by this server will expire. The default is 24 hours = 86400 seconds.
Property methods: RefreshTokenIntervalDisplayToLogical(), RefreshTokenIntervalGet(), RefreshTokenIntervalGetStored(), RefreshTokenIntervalIsValid(), RefreshTokenIntervalLogicalToDisplay(), RefreshTokenIntervalNormalize(), RefreshTokenIntervalSet()
property ReturnRefreshToken as %String;
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
Property methods: ReturnRefreshTokenDisplayToLogical(), ReturnRefreshTokenGet(), ReturnRefreshTokenGetStored(), ReturnRefreshTokenIsValid(), ReturnRefreshTokenLogicalToDisplay(), ReturnRefreshTokenLogicalToOdbc(), ReturnRefreshTokenNormalize(), ReturnRefreshTokenSet()
property RevokeTokenClass as %String (MAXLEN = 256, MINLEN = 1) [ InitialExpression = "%OAuth2.Server.Revoke" , Required ];
RevokeTokenClass is the name of a class with the same signatures as %OAuth2.Server.Revoke which overrides the OnRevokeToken method. Any custom handling on token revocation can be done in this method.
Property methods: RevokeTokenClassDisplayToLogical(), RevokeTokenClassGet(), RevokeTokenClassGetStored(), RevokeTokenClassIsValid(), RevokeTokenClassLogicalToDisplay(), RevokeTokenClassLogicalToOdbc(), RevokeTokenClassNormalize(), RevokeTokenClassSet()
property SSLConfiguration as %String (MAXLEN = 64);
The name of the activated TLS/SSL configuration to use loading a request object.
Chosen by user during configuration.
Property methods: SSLConfigurationDisplayToLogical(), SSLConfigurationGet(), SSLConfigurationGetStored(), SSLConfigurationIsValid(), SSLConfigurationLogicalToDisplay(), SSLConfigurationLogicalToOdbc(), SSLConfigurationNormalize(), SSLConfigurationSet()
property ServerCredentials as %String;
ServerCredentials is the alias of the %SYS.X509Credentials object which contains the authoriization server's certificate and private key.
Property methods: ServerCredentialsDisplayToLogical(), ServerCredentialsGet(), ServerCredentialsGetStored(), ServerCredentialsIsValid(), ServerCredentialsLogicalToDisplay(), ServerCredentialsLogicalToOdbc(), ServerCredentialsNormalize(), ServerCredentialsSet()
property ServerPassword as %String (MAXLEN = 128);
ServerPassword is the password for the private key in ServerCredentials if the password is not in the %SYS.X5009Credentials object
Property methods: ServerPasswordDisplayToLogical(), ServerPasswordGet(), ServerPasswordGetStored(), ServerPasswordIsValid(), ServerPasswordLogicalToDisplay(), ServerPasswordLogicalToOdbc(), ServerPasswordNormalize(), ServerPasswordSet()
property SessionClass as %String (MAXLEN = 256, MINLEN = 1) [ InitialExpression = "OAuth2.Server.Session" , Required ];
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.
Property methods: SessionClassDisplayToLogical(), SessionClassGet(), SessionClassGetStored(), SessionClassIsValid(), SessionClassLogicalToDisplay(), SessionClassLogicalToOdbc(), SessionClassNormalize(), SessionClassSet()
property SessionInterval as %Integer (MINVAL = 0) [ InitialExpression = 86400 , Required ];
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.
Property methods: SessionIntervalDisplayToLogical(), SessionIntervalGet(), SessionIntervalGetStored(), SessionIntervalIsValid(), SessionIntervalLogicalToDisplay(), SessionIntervalNormalize(), SessionIntervalSet()
property SigningAlgorithm as %String (VALUELIST = ",HS256,HS384,HS512,RS256,RS384,RS512,ES256,ES384,ES512") [ InitialExpression = "RS256" ];
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 %Net.JSON.JWA for the list of supported algorithms.
Property methods: SigningAlgorithmDisplayToLogical(), SigningAlgorithmGet(), SigningAlgorithmGetStored(), SigningAlgorithmIsValid(), SigningAlgorithmLogicalToDisplay(), SigningAlgorithmLogicalToOdbc(), SigningAlgorithmNormalize(), SigningAlgorithmSet()
property SupportSession as %Boolean;
If SupportSession is true, then OAuth 2.0 user sessions will be supported using the specified SessionClass.
Property methods: SupportSessionDisplayToLogical(), SupportSessionGet(), SupportSessionGetStored(), SupportSessionIsValid(), SupportSessionLogicalToDisplay(), SupportSessionNormalize(), SupportSessionSet()
property SupportedGrantTypes as %String (MAXLEN = 5, MINLEN = 1);
**** 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
Property methods: SupportedGrantTypesDisplayToLogical(), SupportedGrantTypesGet(), SupportedGrantTypesGetStored(), SupportedGrantTypesIsValid(), SupportedGrantTypesLogicalToDisplay(), SupportedGrantTypesLogicalToOdbc(), SupportedGrantTypesNormalize()
property SupportedScopes as array of %String) [ Required ];
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.
Property methods: SupportedScopesBuildValueArray(), SupportedScopesCollectionToDisplay(), SupportedScopesCollectionToOdbc(), SupportedScopesDisplayToCollection(), SupportedScopesDisplayToLogical(), SupportedScopesGet(), SupportedScopesGetObject(), SupportedScopesGetObjectId(), SupportedScopesGetStored(), SupportedScopesGetSwizzled(), SupportedScopesIsValid(), SupportedScopesLogicalToDisplay(), SupportedScopesLogicalToOdbc(), SupportedScopesNormalize(), SupportedScopesOdbcToCollection(), SupportedScopesSet(), SupportedScopesSetObject(), SupportedScopesSetObjectId()
property ValidateUserClass as %String (MAXLEN = 256, MINLEN = 1) [ InitialExpression = "%OAuth2.Server.Validate" , Required ];
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.
Property methods: ValidateUserClassDisplayToLogical(), ValidateUserClassGet(), ValidateUserClassGetStored(), ValidateUserClassIsValid(), ValidateUserClassLogicalToDisplay(), ValidateUserClassLogicalToOdbc(), ValidateUserClassNormalize(), ValidateUserClassSet()

Methods

classmethod Delete() as %Status
Delete this configuration.
deprecated classmethod GetSupportedAlgorithms(Output sigalgs As %List, Output encalgs As %List, Output keyalgs As %List)
Get server supported algorithms This method is deprecated. Use the GetSupportedAlgorithms method in %OAuth2.Utils instead.
classmethod Open(Output sc As %Status) as OAuth2.Server.Configuration
Open the single OAuth2.Server.Configuration instance.
method RotateKeys() as %Status
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.
method Save() as %Status
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.

Indexes

index (IDIndex on Key) [IdKey, Type = key, Unique];
The IDKEY for the singleton configuration class.
Index methods: IDIndexCheck(), IDIndexDelete(), IDIndexExists(), IDIndexOpen(), IDIndexSQLCheckUnique(), IDIndexSQLExists(), IDIndexSQLFindPKeyByConstraint(), IDIndexSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (OAuth2.Server.Configuration)

^OAuth2.Server.ConfigurationD(ID)
=
%%CLASSNAME
IssuerEndpoint
Description
AccessTokenInterval
AuthorizationCodeInterval
SupportedScopes
DefaultScope
AllowUnsupportedScope
SupportedGrantTypes
ReturnRefreshToken
CustomizationRoles
AuthenticateClass
ValidateUserClass
GenerateTokenClass
ServerCredentials
CustomizationNamespace
RefreshTokenInterval
AudRequired
SigningAlgorithm
EncryptionAlgorithm
KeyAlgorithm
ServerPassword
SessionInterval
SupportSession
SessionClass
SSLConfiguration
Metadata
ClientSecretInterval
PrivateJWKS
PublicJWKS
JWKSFromCredentials
RevokeTokenClass
AllowPublicClientRefresh
ForcePKCEForPublicClients
ForcePKCEForConfidentialClients
FeedbackOpens in a new tab