claims

package
v0.0.0-...-72324ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2015 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Overview

claims パラメータ関係。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claim

type Claim struct {
	// contains filtered or unexported fields
}

認証リクエストの claims.id_token や claims.userinfo パラメータの要素。

func New

func New(ess bool, val interface{}, vals []interface{}, lang string) *Claim

主にテスト用。

func (*Claim) Essential

func (this *Claim) Essential() bool

func (*Claim) Language

func (this *Claim) Language() string

func (*Claim) MarshalJSON

func (this *Claim) MarshalJSON() (data []byte, err error)
{
    "essential": <必須か>,
    "value": <指定値>,
    "values": [
        <候補値>,
        ....
    ]
}

func (*Claim) UnmarshalJSON

func (this *Claim) UnmarshalJSON(data []byte) error

func (*Claim) Value

func (this *Claim) Value() interface{}

func (*Claim) Values

func (this *Claim) Values() []interface{}

type Claims

type Claims map[string]*Claim

認証リクエストの claims パラメータの id_token や userinfo 要素。

func (Claims) MarshalJSON

func (this Claims) MarshalJSON() (data []byte, err error)

func (*Claims) UnmarshalJSON

func (this *Claims) UnmarshalJSON(data []byte) error

type Request

type Request struct {
	// contains filtered or unexported fields
}

認証リクエストの claims パラメータ。

func NewRequest

func NewRequest(idTok, acnt map[string]*Claim) *Request

主にテスト用。

func (*Request) AccountEntries

func (this *Request) AccountEntries() map[string]*Claim

アカウント情報エンドポイントから返すように要求されているクレームの情報を返す。

func (*Request) IdTokenEntries

func (this *Request) IdTokenEntries() map[string]*Claim

ID トークンに入れて返すように要求されているクレームの情報を返す。

func (*Request) MarshalJSON

func (this *Request) MarshalJSON() (data []byte, err error)
{
    "id_token": {
        <属性名>: <Claim>,
        ...
    },
    "userinfo": {
        <属性名>: <Claim>,
        ...
    }
}

func (*Request) Names

func (this *Request) Names() (clms, optClms map[string]bool)

クレーム名を返す。 clms: 必須クレーム名。 optClms: 必須でないクレーム名。

func (*Request) UnmarshalJSON

func (this *Request) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL