oidc

package
v0.19.15 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var INVALID_PROVIDER_ERROR = fmt.Errorf("INVALID PROVIDER")

Functions

This section is empty.

Types

type EmailClaims

type EmailClaims struct {
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	jwt.StandardClaims
}

type Login

type Login struct {
	AccountId             string    `json:"account_id"`
	Username              string    `json:"username"`
	ExternalUsername      string    `json:"external_username"`
	ExternalEmail         string    `json:"external_email"`
	ExternalEmailVerified bool      `json:"external_email_verified"`
	Provider              Provider  `json:"provider"`
	AccessToken           string    `json:"access_token"`
	RefreshToken          string    `json:"refresh_token"`
	ExpiresAt             time.Time `json:"expires_at"`
}

type Provider

type Provider string
const (
	TWITCH  Provider = "twitch"
	YOUTUBE Provider = "youtube"
)

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func InitValidator

func InitValidator(url, issuer, aud string, ctx context.Context) (v Validator, err error)

func (Validator) Validate

func (v Validator) Validate(tokenString string, claims jwt.Claims) (token *jwt.Token, err error)

Jump to

Keyboard shortcuts

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