Documentation ¶
Index ¶
- type Authenticator
- func (a *Authenticator) AuthenticationMiddleware(next http.Handler) http.Handler
- func (a *Authenticator) GetTokenFromContext(ctx context.Context) (token string, err error)
- func (a *Authenticator) MyGRPCAuthFunction(ctx context.Context) (newContext context.Context, err error)
- func (a *Authenticator) ReadAuthData(fileName string) (authMap map[string]string, err error)
- func (a *Authenticator) VerifyToken(token string) (status bool, errMsg string)
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 (*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)
Click to show internal directories.
Click to hide internal directories.