utils

package
v0.0.0-...-6cdb919 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeOidcProvider

func MakeOidcProvider(ctx context.Context, idp *models.IdentityProvider) (*oidc.Provider, error)

func MakeOuath2Config

func MakeOuath2Config(ctx context.Context, idp *models.IdentityProvider,
	extraScopes ...string) (*oauth2.Config, error)

Types

type Claims

type Claims struct {
	Sub   string `json:"sub"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

func HandleOIDC

func HandleOIDC(ctx context.Context, idp *models.IdentityProvider,
	code string, redirect ...string) (*Claims, error)

HandleOIDC gets user's email and name by code & token

Jump to

Keyboard shortcuts

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