authorizer

package
v2.0.156+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Copyright The Linux Foundation and each contributor to CommunityBridge. SPDX-License-Identifier: MIT

Copyright The Linux Foundation and each contributor to CommunityBridge. SPDX-License-Identifier: MIT

Copyright The Linux Foundation and each contributor to CommunityBridge. SPDX-License-Identifier: MIT

Copyright The Linux Foundation and each contributor to CommunityBridge. SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewValidatorMaker

func NewValidatorMaker() *validatorContainer

NewValidatorMaker create a new ValidatorMaker.

Types

type Interfaces

Interfaces defines an interface to interact with the Interfaces layer

func NewInterfaces

func NewInterfaces(usecases Usecases) Interfaces

NewInterfaces creates an InterfacesInteractor

type TokenInfo

type TokenInfo struct {
	Email         string
	EmailVerified bool
	Subject       string
}

TokenInfo represents claims present in the token

type TokenValidator

type TokenValidator interface {
	ValidateRequest(*http.Request) (*jwt.JSONWebToken, error)
	Claims(*http.Request, *jwt.JSONWebToken, ...interface{}) error
}

TokenValidator defines the interface necessary for validating a token and extracting claims from the token

type Usecases

type Usecases interface {
	ValidateToken(token string) (TokenInfo, error)
}

Usecases is an interface for interacting with the authorizer's usecases layer.

func NewUsecases

func NewUsecases(validator TokenValidator) Usecases

NewUsecases create a new usecases

type ValidatorMaker

type ValidatorMaker interface {
	NewTokenValidator() (TokenValidator, error)
}

ValidatorMaker is the interface for interacting with the validator layer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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