auth

package
v0.0.0-...-f378178 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

func NewAuthenticator

func NewAuthenticator(authFileName string) (*Authenticator, error)

func (*Authenticator) AuthenticationMiddleware

func (a *Authenticator) AuthenticationMiddleware(next http.Handler) http.Handler

func (*Authenticator) GetTokenFromContext

func (a *Authenticator) GetTokenFromContext(ctx context.Context) (token string, err error)

func (*Authenticator) MyGRPCAuthFunction

func (a *Authenticator) MyGRPCAuthFunction(ctx context.Context) (newContext context.Context, err error)

func (*Authenticator) ReadAuthData

func (a *Authenticator) ReadAuthData(fileName string) (authMap map[string]string, err error)

func (*Authenticator) VerifyToken

func (a *Authenticator) VerifyToken(token string) (status bool, errMsg string)

Jump to

Keyboard shortcuts

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