auth

package
v0.0.0-...-16c2cb2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

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

AuthProvider is used to authenticate users

func NewAuthProvider

func NewAuthProvider(config *c.APIConfig) *AuthProvider

Creates a new AuthProvider Downloads and caches the keys from the OAuthKeyDiscoveryURL

func (*AuthProvider) GetJWTConfig

func (a *AuthProvider) GetJWTConfig() echojwt.Config

Returns the JWT configuration for the middleware to use

func (*AuthProvider) ValidateToken

func (a *AuthProvider) ValidateToken(token *jwt.Token) (interface{}, error)

Validates the token and returns the public key This is used within the middleware to validate the token is from the correct issuer

Jump to

Keyboard shortcuts

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