auth

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Issuer = "clouditor"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	auth.UnimplementedAuthenticationServer

	TokenSecret string
}

Service is an implementation of the gRPC Authentication service

func (Service) HashPassword

func (s Service) HashPassword(password string) (string, error)

HashPassword returns a hash of password using argon2id.

func (Service) Login

func (s Service) Login(ctx context.Context, request *auth.LoginRequest) (response *auth.LoginResponse, err error)

Login handles a login request

type UserClaims

type UserClaims struct {
	jwt.StandardClaims
	FullName string `json:"full_name"`
	EMail    string `json:"email"`
}

UserClaims extend jwt.StandardClaims with more detailed claims about a user

Jump to

Keyboard shortcuts

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