/
context.go
40 lines (30 loc) · 1.4 KB
/
context.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* ORY Hydra - Cloud Native OAuth 2.0 and OpenID Connect Server
*
* Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. Keep in mind that this document reflects the latest branch, always. Support for versioned documentation is coming in the future.
*
* OpenAPI spec version: Latest
* Contact: hi@ory.am
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
package swagger
import (
"time"
)
// Context contains an access token's session data
type Context struct {
// Extra represents arbitrary session data.
AccessTokenExtra map[string]interface{} `json:"accessTokenExtra,omitempty"`
// ClientID is id of the client the token was issued for..
ClientId string `json:"clientId,omitempty"`
// ExpiresAt is the expiry timestamp.
ExpiresAt time.Time `json:"expiresAt,omitempty"`
// GrantedScopes is a list of scopes that the subject authorized when asked for consent.
GrantedScopes []string `json:"grantedScopes,omitempty"`
// IssuedAt is the token creation time stamp.
IssuedAt time.Time `json:"issuedAt,omitempty"`
// Issuer is the id of the issuer, typically an hydra instance.
Issuer string `json:"issuer,omitempty"`
// Subject is the identity that authorized issuing the token, for example a user or an OAuth2 app. This is usually a uuid but you can choose a urn or some other id too.
Subject string `json:"subject,omitempty"`
}