auth

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, oidcConfig *OIDCConfig, issuerURL string, doPKCE bool) (rawIDTokey string, err error)

* Gets an OpenID Connect authorization token from the authorization provider (issuer). * It firsts discuvers the authorization endppoint from the issuerURL. Then, it * opens a browser window towards the authorization endpoint. A local webserver is temporarily * started at a random port to retrieve the issued authorization token. * This token is then returned as an http url-encoded string.

func VerifyRawToken

func VerifyRawToken(ctx context.Context, clientID string, issuerURL string, rawIDToken string) (*oidc.IDToken, error)

Types

type OIDCConfig

type OIDCConfig struct {
	IssuerUrl    string `json:"issuer_url"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type OIDCIssuerConfig

type OIDCIssuerConfig = []*OIDCConfig

Jump to

Keyboard shortcuts

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