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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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