gpii-universal
Version:
Cross platform, core components of the GPII personalization infrastructure.
31 lines (26 loc) • 1.26 kB
Markdown
The authorization grant finder provides API that allows users to use access tokens to retrieve their corresponding
authorization information. The access tokens can be requested via [Resource Owner GPII key
Grant](https://wiki.gpii.net/w/GPII_OAuth_2_Guide#Resource_Owner_GPII_Key_Grant).
* **description**: Retrieve the authorization information of an access token.
* **parameters:**
* accessToken: String. A string representing an authorization issued to the client.
* **return:** A promise object. Once resolved, this object contains the authorization information for the access token.
Return `undefined` when the access token is not found.
* An example of the returned object:
```JSON
{
"accessToken": "the_input_accessToken",
"gpiiKey": "bob_gpii_key",
"allowSettingsGet": true,
"allowSettingsPut": true,
"allowedPrefsToWrite": [
"http://registry.gpii.net/common/language",
"http://registry.gpii.net/common/DPIScale",
"http://registry.gpii.net/common/highContrast/enabled",
"http://registry.gpii.net/common/selfVoicing/enabled",
"http://registry.gpii.net/applications/com.microsoft.windows.mouseSettings"
]
}
```