auth

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthInterceptor

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

func NewAuthInterceptor

func NewAuthInterceptor(jwtManager JWTManager) (*AuthInterceptor, error)

func (*AuthInterceptor) Unary

func (interceptor *AuthInterceptor) Unary() grpc.UnaryServerInterceptor

type AuthServer

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

func NewAuthServer

func NewAuthServer(jwtManager *JWTManager) *AuthServer

type CaosJWTManager

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

func NewCaosJWTManager

func NewCaosJWTManager() *CaosJWTManager

func (*CaosJWTManager) Verify

func (manager *CaosJWTManager) Verify(ctx context.Context, token string) error

type JWTManager

type JWTManager interface {
	Verify(context.Context, string) error
}

type SimpleJWTManager

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

func NewSimpleJWTManager

func NewSimpleJWTManager() *SimpleJWTManager

func (*SimpleJWTManager) Verify

func (manager *SimpleJWTManager) Verify(ctx context.Context, jwtToken string) error

type UserClaims

type UserClaims struct {
	jwt.StandardClaims
	Username   string `json:"name"`
	FamilyName string `json:"family_name"`
	Email      string `json:"email"`
}

Jump to

Keyboard shortcuts

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