auth

package
v0.0.0-...-8d2fcc7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package auth ...

Package auth ...

Index

Constants

This section is empty.

Variables

Lock defines mutex lock to avoid race conditions

Functions

func Auth

func Auth(ctx context.Context, req *authproto.AuthRequest) (int32, string)

Auth functionality will do the following

  1. It will check whether the session taken is valid
  2. fetch the privileges from DB against session token and check the service has the previlege

func CheckSessionCreationCredentials

func CheckSessionCreationCredentials(ctx context.Context, userName, password string) (*asmodel.User, *errors.Error)

CheckSessionCreationCredentials defines the auth at the time of session creation

func CheckSessionTimeOut

func CheckSessionTimeOut(ctx context.Context, sessionToken string) (*asmodel.Session, *errors.Error)

CheckSessionTimeOut defines the session validity check

func CustomAuthLog

func CustomAuthLog(ctx context.Context, sessionToken, msg string, respStatusCode int32)

CustomAuthLog function takes session token, message and response status code Gets the user id and role id for the session token provided logs the messages in custom log format

Types

This section is empty.

Jump to

Keyboard shortcuts

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