auth

package
v0.0.0-...-fc9dd9a Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

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

Authorizer data model

func NewAuthorizer

func NewAuthorizer(authValidator Validator, userPermissioner UserPermissioner) Authorizer

NewAuthorizer creates a new authorizer based on the specified parameters

func (Authorizer) SecurityAuth

func (a Authorizer) SecurityAuth(token string, scopes []string) (*user.CLAUser, error)

SecurityAuth creates a new CLA user based on the token and scopes

type Scope

type Scope string

Scope string

type UserPermissioner

type UserPermissioner interface {
	GetUserAndProfilesByLFID(lfidUsername string) (user.CLAUser, error)
	GetUserProjectIDs(userID string) ([]string, error)
	GetClaManagerCorporateClaIDs(userID string) ([]string, error)
	GetUserCompanyIDs(userID string) ([]string, error)
}

UserPermissioner interface methods

type Validator

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

Validator data model

func NewAuthValidator

func NewAuthValidator(domain, clientID, usernameClaim, algorithm string) (Validator, error)

NewAuthValidator creates a new auth0 validator based on the specified parameters

func (Validator) VerifyToken

func (av Validator) VerifyToken(token string) (map[string]interface{}, error)

VerifyToken verifies the specified token

Jump to

Keyboard shortcuts

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