Railgun

if it ain't broke, we'll break it

User Tools

Site Tools


senses:types:auth

This is an old revision of the document!


auth

The auth table type contains information about an auth token. It follows a format similar to the token response body endpoint in the OAuth2 specification1), though the refresh_token field will never be included.

This type is used as the return value for getAuthToken() in both the satori and koishi globals and can be used to make HTTP requests to Flashii API endpoints on behalf of the either bot.

access_token

The access_token field contains the access token string, used for the second part of a HTTP Authorization header.

token_type

The token_type field contains the type string of the token, used for the first part of a HTTP Authorization header.

expires_in

The optional expires_in field contains an integer indicating how many seconds this token has left to live before it must be renewed using the refresh_token. This process is handled by the Komeiji runtime, which is why the refresh_token field is always omitted.

scope

The optional scope field contains the scope string for the access_token if it differed from the scope the Komeiji runtime requested with the authorization server.

1)
The OAuth 2.0 Authorization Framework (2012)
D. Hardt
RFC Editor DOI:10.17487/rfc6749
senses/types/auth.1753662778.txt.gz · Last modified: by flash