This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new window

For information on migrating to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).


class %OAuth2.Server.Generate extends %Library.RegisteredObject

The %OAuth2.Server.Generate is the default GenerateTokernClass which is included with the server. The default class will generate a random string as the opaque access token.
The GenerateTokenClass is specified in the Authorization Server Configuration. It must contain a GenerateAccessToken method will be used to generate an access token based on the array of properties that is returned by the ValidateUser method.

Method Inventory (Including Private)

Methods (Including Private)

classmethod GenerateAccessToken(properties As %OAuth2.Server.Properties, Output sc As %Status) as %String
The GenerateAccessToken method returns an access token. The access token may be based on the properties argument. In addition values for claims to be added to the JSON response object may be returned in the properties.ResponseProperties array.
However the method in this default class just returns an opaque random string.
classmethod IsJWT() as %Boolean
The IsJWT method returns true if the GenerateAccessToken method returns a JWT. IsJWT is used to determine inclusion of algorithms for access token in server metadata.

Inherited Members

Inherited Methods (Including Private)

FeedbackOpens in a new window