Documentation ¶
Index ¶
- type AuthFailure
- type Client
- func (api Client) CheckRequest(req *http.Request, florenceToken, serviceAuthToken string) (context.Context, int, AuthFailure, error)
- func (api Client) CheckTokenIdentity(ctx context.Context, token string, tokenType TokenType) (*dprequest.IdentityResponse, error)
- func (api Client) Checker(ctx context.Context, check *health.CheckState) error
- type TokenIdentity
- type TokenType
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 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)
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
Click to show internal directories.
Click to hide internal directories.