auth

package
v2.33.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationExtrasHeader = "authorization-extras"
)

Variables

This section is empty.

Functions

func SetUser

func SetUser(c echo.Context, user *User) error

func ValidateAuthHeaderExists added in v2.16.0

func ValidateAuthHeaderExists(c echo.Context, cfgProvider *config.ConfigProviderWithRefresh) error

ValidateAuthHeaderExists validates that the autorization header exists if auth is enabled. User autorization should be done in the frontend by claim-mapper and authorizer plugins. See https://docs.temporal.io/security#authentication

Types

type Claims

type Claims struct {
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	Name          string `json:"name"`
	Picture       string `json:"picture"`
}

type IDToken added in v2.2.0

type IDToken struct {
	RawToken string
	Claims   *Claims
}

type User

type User struct {
	OAuth2Token *oauth2.Token
	IDToken     *IDToken
}

func ExchangeCode

func ExchangeCode(ctx context.Context, r *http.Request, config *oauth2.Config, provider *oidc.Provider) (*User, error)

type UserResponse added in v2.7.0

type UserResponse struct {
	AccessToken string
	IDToken     string
	Name        string
	Email       string
	Picture     string
}

Jump to

Keyboard shortcuts

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