model

package
v0.0.0-...-14b8d0e Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationCodeQueryResponse

type AuthorizationCodeQueryResponse struct {
	Code  string `json:"code"`
	State string `json:"state"`
}

type AuthorizationRequest

type AuthorizationRequest struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	ResponseType string `json:"response_type"`
	RedirectURI  string `json:"redirect_uri"`
	State        string `json:"state"`
}

type Conf

type Conf struct {
	//Logger        *logrus.Logger
	Storage       Storage
	BaseURL       string
	GatewayClient GatewayClient
	UpstreamIdP   oauth2.Config
}

type DI

type DI struct {
	DB   *redis.Client
	Conf Conf
}

func NewDIContainer

func NewDIContainer(c Conf) (*DI, error)

type DiscoveryMeta

type DiscoveryMeta struct {
	Issuer                string   `json:"issuer"`
	AuthorizationEndpoint string   `json:"authorization_endpoint"`
	TokenEndpoint         string   `json:"token_endpoint"`
	Keys                  string   `json:"keys"`
	UserInfo              string   `json:"user_info"`
	Subjects              []string `json:"subjects"`
	Callback              string   `json:"callback,omitempty"`
}

type GatewayClient

type GatewayClient struct {
	ClientID     string
	ClientSecret string
	RedirectURI  string
	Discovery    DiscoveryMeta
}

type Storage

type Storage struct {
	Address  string
	Password string
	DB       int
}

type TokenRequest

type TokenRequest struct {
	GrantType    string `json:"grant_type" schema:"grant_type"`
	ClientID     string `json:"client_id "schema:"client_id"`
	ClientSecret string `json:"client_secret" schema:"client_secret"`
	Code         string `json:"code" schema:"code"`
	RedirectURI  string `json:"redirect_uri" schema:"redirect_uri"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	IDToken      string `json:"id_token"`
}

Jump to

Keyboard shortcuts

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