oauthtest

package
v0.384.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IodcTokenResponse added in v0.373.0

type IodcTokenResponse struct {
	authapi.TokenResponse
	IdToken string `json:"id_token"`
}

type OAuthClient added in v0.373.0

type OAuthClient struct {
	ClientId     string
	ClientSecret string
	RedirectUrl  string
}

type OidcServer

type OidcServer struct {
	Issuer          string
	Config          map[string]any
	IdTokenLifespan time.Duration

	PrivateKey *rsa.PrivateKey
	Users      map[string]*oauth.UserClaims

	TokenUrl     string
	AuthorizeUrl string
	// contains filtered or unexported fields
}

func NewServer added in v0.373.0

func NewServer() (*OidcServer, error)

func (*OidcServer) Close

func (o *OidcServer) Close()

func (*OidcServer) FetchIdToken

func (o *OidcServer) FetchIdToken(sub string, aud []string) (string, error)

func (*OidcServer) RenewPrivateKey

func (o *OidcServer) RenewPrivateKey() error

func (*OidcServer) SetUser

func (o *OidcServer) SetUser(sub string, claims *oauth.UserClaims)

func (*OidcServer) WithOAuthClient added in v0.373.0

func (o *OidcServer) WithOAuthClient(client *OAuthClient)

Jump to

Keyboard shortcuts

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