identity

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client clients.APIClient

Client is an alias to a generic/common api client structure

func NewAPIClient

func NewAPIClient(cli rchttp.Clienter, url string) (api *Client)

NewAPIClient returns a Client

func (Client) CheckRequest

func (api Client) CheckRequest(req *http.Request, florenceToken, serviceAuthToken string) (context.Context, int, authFailure, error)

CheckRequest calls the AuthAPI to check florenceToken or serviceAuthToken

func (Client) CheckTokenIdentity added in v1.6.0

func (api Client) CheckTokenIdentity(ctx context.Context, token string, tokenType TokenType) (*common.IdentityResponse, error)

CheckTokenIdentity Checks the identity of a provided token, for a particular token type (i.e. user or service)

type Clienter

type Clienter interface {
	CheckRequest(req *http.Request) (context.Context, int, authFailure, error)
}

Clienter provides an interface to checking identity of incoming request

type TokenType added in v1.6.0

type TokenType int

TokenType iota enum defines possible token types

const (
	TokenTypeUser TokenType = iota
	TokenTypeService
)

Possible Token types

func (TokenType) String added in v1.6.0

func (t TokenType) String() string

Values of the token types

Jump to

Keyboard shortcuts

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