Documentation ¶
Index ¶
- type Db
- type Element
- func (this *Element) Account() string
- func (this *Element) AccountAttributes() map[string]bool
- func (this *Element) Date() time.Time
- func (this *Element) Expires() time.Time
- func (this *Element) Id() string
- func (this *Element) IdTokenAttributes() map[string]bool
- func (this *Element) LoginDate() time.Time
- func (this *Element) MarshalJSON() (data []byte, err error)
- func (this *Element) Nonce() string
- func (this *Element) RedirectUri() string
- func (this *Element) Scope() map[string]bool
- func (this *Element) SetToken(tok string)
- func (this *Element) Ta() string
- func (this *Element) Token() string
- func (this *Element) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Db ¶
type Db interface { // 取得。 Get(id string) (*Element, error) // 保存。 // exp: 保存期限。この期間以降は Get や Replace できなくて良い。 Save(elem *Element, exp time.Time) error // 上書き。 // savedDate が保存されている要素の更新日時と同じでなければ失敗する。 Replace(elem *Element, savedDate time.Time) (ok bool, err error) }
認可コード情報の格納庫。
func NewMemoryDb ¶
func NewMemoryDb() Db
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
認可コード情報。
func (*Element) AccountAttributes ¶
アカウント情報エンドポイントでの提供可能属性を返す。
func (*Element) IdTokenAttributes ¶
ID トークンでの提供可能属性を返す。
func (*Element) MarshalJSON ¶
{ "id": <ID>, "expires": <有効期限>, "account": <アカウント ID>, "login_date": <ログイン日時>, "scope": [ <許可スコープ>, ... ], "id_token": [ <ID トークンでの許可属性>, ... ], "userinfo": [ <アカウント情報エンドポイントでの許可属性>, ], "client_id": <TA の ID>, "redirect_uri": <リダイレクトエンドポイント>, "nonce": <nonce 値>, "token": <アクセストークン>, "date": <更新日時> }
func (*Element) RedirectUri ¶
元になったリクエストの redirect_uri を返す。
func (*Element) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.