identity

package
v2.114.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MIT Imports: 11 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthFailure

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

func New(zebedeeURL string) *Client

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

func NewWithHealthClient

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

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

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 TokenIdentity added in v2.4.7

type TokenIdentity interface {
	CheckTokenIdentity(ctx context.Context, token string, tokenType TokenType) (*dprequest.IdentityResponse, error)
}

TokenIdentity is the Client used by the GraphQL package to make queries

type TokenType

type TokenType int

TokenType iota enum defines possible token types

const (
	TokenTypeUser TokenType = iota
	TokenTypeService
)

Possible Token types

func (TokenType) String

func (t TokenType) String() string

Values of the token types

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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