tokenissuer

package
v10.333.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents the remote API client.

func NewClient

func NewClient() (*Client, error)

NewClient returns a remote API client that can be used for issuing API calls to the master enforcer.

func (*Client) Issue

func (c *Client) Issue(ctx context.Context, contextID string, stype common.ServiceTokenType, audience string, validity time.Duration) (string, error)

Issue implements the ServiceTokenIssuer interface.

func (*Client) RetrieveToken

func (c *Client) RetrieveToken(contextID string, stype common.ServiceTokenType, audience string, validity time.Duration) (string, error)

RetrieveToken will issue a token request to the main over the RPC channnel.

func (*Client) Run

func (c *Client) Run(ctx context.Context) error

Run will initialize the client.

type TokenClient

type TokenClient interface {
	Run(ctx context.Context) error
	Issue(ctx context.Context, contextID string, stype common.ServiceTokenType, audience string, validity time.Duration) (string, error)
}

TokenClient interface provides a start function. the client is used to request tokens.

Directories

Path Synopsis
Package mocktokenclient is a generated GoMock package.
Package mocktokenclient is a generated GoMock package.

Jump to

Keyboard shortcuts

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