For Authlete 2.x documentation, see 2.x version.
This feature is available since Authlete 2.0.
How to Create Scope Attributes
To create scope attributes for a service:- Log in to the Authlete Management Console.
- Navigate to Service Settings > Tokens and Claims > Advanced > Scope.
- In the Supported Scopes section, click the Add button.
- In the Add/Edit Supported Scope dialog:
- Enter a Scope Name and Description.
- In the Scope Attributes section, click Add.
- Enter the Key and Value for the scope attribute.
- Example: Key =
attr_key1, Value =attr_value1.
- Example: Key =
- Click Add to save the attribute.
- Click Save Changes to apply the changes.
Predefined Scope Attributes
The following scope attributes are predefined by Authlete for special purposes:| Attribute Key | Attribute Value | Description |
|---|---|---|
access_token.duration | number | Configures access token duration for each scope. |
refresh_token.duration | number | Configures refresh token duration for each scope. |
fapi | r | Enables the FAPI read-only API profile. |
fapi | rw | Enables the FAPI read-and-write API profile. |
regex | regular expression | Enables a scope string with a dynamic value as part of it. |
fapi2 | sp | Enables the FAPI 2.0 Security Profile. |
fapi2 | ms-authreq | Enables the FAPI 2.0 Message Signing profile for Authorization Requests. |
fapi2 | ms-authres | Enables the FAPI 2.0 Message Signing profile for Authorization Responses. |
How to Use Scope Attributes
Scope attributes can be utilized for various use cases, such as tagging risk levels to scopes or specifying required ACRs for granting a scope. In addition to custom use cases, you can leverage the predefined scope attributes provided by Authlete for specific system-level functionality.The authorization response
The authorization response from Authlete from/api/auth/authorization endpoint
includes the scope attributes as the response body below