identity

package
v1.43.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 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 AuthFailure added in v1.28.0

type AuthFailure error

AuthFailure is an alias to an error type, this represents the failure to authenticate request over a generic error from a http or marshalling error

type Client

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

Client is an identity client which can be used to make requests to the server

func New added in v1.28.0

func New(zebedeeURL string) *Client

New creates a new instance of Identity Client with a given zebedee url

func NewWithHealthClient added in v1.28.0

func NewWithHealthClient(hcCli *healthcheck.Client) *Client

NewWithHealthClient creates a new instance of Client, reusing the URL and Clienter from the provided health check 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) (*dprequest.IdentityResponse, error)

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

func (Client) Checker added in v1.28.0

func (api Client) Checker(ctx context.Context, check *health.CheckState) error

Checker calls zebedee api health endpoint and returns a check object to the caller.

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