Class OAuthSession
Holds an access token and optionally a refresh token.
Properties
Name | Type | Description |
canRefresh [get]
|
bool | Indicates whether this session can refresh its access token.
|
expired [get]
|
bool | |
expires [get]
|
std.datetime.systime.SysTime | Expiration time of this session's access token.
|
scopes [get]
|
string[] | All scopes this session has authorization for.
|
signature [get]
|
string | Unique signature of this session.
|
timestamp [get]
|
std.datetime.systime.SysTime | Timestamp of this session
|
tokenData [get]
|
const(vibe.data.json.Json) | Json object from the access token response
|
Methods
Name | Description |
authorizeRequest
(req)
|
Authorize an HTTP request using this session's token.
|
hasScope
(someScope)
|
Indicates whether this session has authorization for the given scope.
|
load
(settings, httpSession)
|
Load OAuthSession data from Vibe.d session.
|
refresh
()
|
Refresh the access token of this session.
|
save
(httpSession)
|
Save this session's data into an HTTP session.
|
verify
(httpSession)
|
Verify if this is the session referenced by the given HTTP session.
|
handleAccessTokenResponse
(atr, timestamp, isReload)
|
Handles the response to an access token request and sets the properties
of this session accordingly.
|