auth

package
v1.3.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Issuer = "clouditor"
)

Variables

This section is empty.

Functions

func StartDedicatedAuthServer added in v1.3.5

func StartDedicatedAuthServer(address string) (sock net.Listener, server *grpc.Server, err error)

StartDedicatedAuthServer starts a gRPC server containing just the auth service

Types

type Service

type Service struct {
	auth.UnimplementedAuthenticationServer

	TokenSecret string
}

Service is an implementation of the gRPC Authentication service

func (Service) CreateDefaultUser added in v1.3.3

func (Service) CreateDefaultUser(username string, password string)

CreateDefaultUser creates a default user in the database

func (Service) Login

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

Login handles a login request

type UserClaims

type UserClaims struct {
	jwt.RegisteredClaims
	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