Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateImpersonatedSession(ctx context.Context, token, user string) (*SessionData, error)
- func (c *Client) CreateImpersonatedSessionToken(ctx context.Context, token, username string) (string, error)
- func (c *Client) CreateSession(ctx context.Context, credentials Credentials) (*SessionData, error)
- func (c *Client) CreateSessionToken(ctx context.Context, credentials Credentials) (string, error)
- func (c *Client) ReadSession(ctx context.Context, token string) (*SessionData, error)
- type Credentials
- type Error
- type SessionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents a client communicating with auth3
func (*Client) CreateImpersonatedSession ¶
func (c *Client) CreateImpersonatedSession(ctx context.Context, token, user string) (*SessionData, error)
CreateImpersonatedSession uses an existing session token to create an impersonated session, returning the session data rather than just the token.
func (*Client) CreateImpersonatedSessionToken ¶
func (c *Client) CreateImpersonatedSessionToken(ctx context.Context, token, username string) (string, error)
CreateImpersonatedSessionToken uses an existing session token to create an impersonated session and returns its token.
func (*Client) CreateSession ¶
func (c *Client) CreateSession(ctx context.Context, credentials Credentials) (*SessionData, error)
CreateSession creates a session, returning the session data rather than just the token.
func (*Client) CreateSessionToken ¶
CreateSessionToken creates a session and returns the token.
func (*Client) ReadSession ¶
ReadSession takes a session token and returns the session data for that token, or nil is the session is invalid.
type Credentials ¶
Credentials provides a number of credentials used to authenticate a session. We expect factor => credential, i.e: {"password" => "foo", "yubikey" => "cccbar"} FIXME: this is a bit of a lie as you also pass the username here