services

package
v0.0.0-...-a46d1cd Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequestParams

type AuthRequestParams struct {
	State        string
	Scopes       []string
	RedirectURI  string
	CustomParams map[string]string
}
type Header struct {
	Alg string `json:"alg"`
	Typ string `json:"typ"`
}

type JwtService

type JwtService struct {
	IntrospectionURL string
	OAuthConfig      *oauth2.Config
}

type JwtTokenValidator

type JwtTokenValidator interface {
	// contains filtered or unexported methods
}

type OAuth2Client

type OAuth2Client struct {
	ClientID     string
	ClientSecret string
	AuthURL      string
	TokenURL     string
	ParUrl       string
	RedirectURI  string
	HttpClient   *http.Client
}

func NewOAuth2Client

func NewOAuth2Client(clientID, clientSecret, authURL, tokenURL, redirectURI string) *OAuth2Client

func (*OAuth2Client) RedirectURL

func (c *OAuth2Client) RedirectURL() string

type OAuth2ClientAuthorizationCodeFlow

type OAuth2ClientAuthorizationCodeFlow struct {
	*OAuth2Client
}

func NewOAuth2ClientAuthorizationCodeFlow

func NewOAuth2ClientAuthorizationCodeFlow(clientID, clientSecret, authURL, tokenURL, redirectURI string) *OAuth2ClientAuthorizationCodeFlow

func (*OAuth2ClientAuthorizationCodeFlow) CreateAuthRequestURL

func (c *OAuth2ClientAuthorizationCodeFlow) CreateAuthRequestURL(params AuthRequestParams) (string, error)

func (*OAuth2ClientAuthorizationCodeFlow) ExchangeCodeForToken

func (c *OAuth2ClientAuthorizationCodeFlow) ExchangeCodeForToken(params TokenExchangeParams) (*oauth2.Token, error)

type OAuth2ClientAuthorizationCodeFlowWithPKCE

type OAuth2ClientAuthorizationCodeFlowWithPKCE struct {
	*OAuth2Client
}

func NewOAuth2ClientAuthorizationCodeFlowWithPKCE

func NewOAuth2ClientAuthorizationCodeFlowWithPKCE(clientID, clientSecret, authURL, tokenURL, redirectURI string) *OAuth2ClientAuthorizationCodeFlowWithPKCE

func (*OAuth2ClientAuthorizationCodeFlowWithPKCE) CreateAuthRequestURL

func (c *OAuth2ClientAuthorizationCodeFlowWithPKCE) CreateAuthRequestURL(params AuthRequestParams) (string, error)

func (*OAuth2ClientAuthorizationCodeFlowWithPKCE) ExchangeCodeForToken

type OAuth2ClientPushedAuthorizationRequestWithPKCE

type OAuth2ClientPushedAuthorizationRequestWithPKCE struct {
	*OAuth2Client
}

func NewOAuth2ClientPushedAuthorizationRequestWithPKCE

func NewOAuth2ClientPushedAuthorizationRequestWithPKCE(clientID, clientSecret, authURL, tokenURL, parURL, redirectURI string) *OAuth2ClientPushedAuthorizationRequestWithPKCE

func (*OAuth2ClientPushedAuthorizationRequestWithPKCE) CreateAuthRequestURL

func (*OAuth2ClientPushedAuthorizationRequestWithPKCE) ExchangeCodeForToken

type OAuthService

type OAuthService interface {
	CreateAuthRequestURL(params AuthRequestParams) (string, error)
	ExchangeCodeForToken(params TokenExchangeParams) (*oauth2.Token, error)
}

type Payload

type Payload struct {
	Iss string `json:"iss"`
	Sub string `json:"sub"`
	Aud string `json:"aud"`
	Exp int64  `json:"exp"`
	Nbf int64  `json:"nbf"`
	Iat int64  `json:"iat"`
}

type TokenExchangeParams

type TokenExchangeParams struct {
	Code         string
	CodeVerifier string
	RedirectURI  string
	CustomParams map[string]string
}

Jump to

Keyboard shortcuts

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