interact

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsentResponse

type ConsentResponse struct {
	UserSessionId string       `json:"user_session_id"`
	GrantedScopes []oidc.Scope `json:"granted_scopes"`
	Remember      int64        `json:"remember"`
}

type LoginResponse

type LoginResponse struct {
	Subject  string          `json:"subject"`
	AuthTime int64           `json:"auth_time"`
	Acr      string          `json:"acr"`
	Amr      []string        `json:"amr"`
	Remember int64           `json:"remember"`
	UIData   json.RawMessage `json:"ui_data"`
}

func (*LoginResponse) ToUserSession

func (r *LoginResponse) ToUserSession() *user.Session

ToUserSession transforms the content of the login response to user.Session.

type Process

type Process struct {
	ConsentResolver auth.UserConsentResolver
	ConsentStorage  user.ConsentStorage
	Provider        *pkg.Provider
	Logger          *zerolog.Logger
}

func (*Process) Consent

func (p *Process) Consent(ctx context.Context, ar *auth.Request, payload *ConsentResponse) (*Response, error)

func (*Process) Login

func (p *Process) Login(ctx context.Context, ar *auth.Request, payload *LoginResponse) (*Response, error)

func (*Process) Next

func (p *Process) Next(ar *auth.Request) (*Response, error)

func (*Process) SelectAccount

func (p *Process) SelectAccount(ctx context.Context, ar *auth.Request, payload *SelectAccountResponse) (*Response, error)

type Response

type Response struct {
	UserSessionId string
	Client        *client.Client
	Next          next
}

Response contains all the response data at the interaction endpoint.

func (*Response) MarshalJSON

func (r *Response) MarshalJSON() ([]byte, error)

type SelectAccountResponse

type SelectAccountResponse struct {
	UserSessionId string `json:"user_session_id"`
}

Jump to

Keyboard shortcuts

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