Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auther ¶
type Auther interface { CustomToken(ctx context.Context, uid string) (string, error) AuthenticateToken(ctx context.Context, customToken string) (string, error) }
Auther is an auth abstraction layer interface
type Client ¶
type Client struct{}
Client to interact with auth API
func (*Client) AuthenticateToken ¶
AuthenticateToken Verifies provided token and if valid, extracts eHRID from it.
func (*Client) CustomToken ¶
CustomToken creates a signed custom authentication token with the specified user ID. The resulting JWT can be used in a Firebase client SDK to trigger an authentication flow. See https://firebase.google.com/docs/auth/admin/create-custom-tokens#sign_in_using_custom_tokens_on_clients for more details on how to use custom tokens for client authentication.
type MockClient ¶
type MockClient struct{}
MockClient mocks auth client functionaly for unit tests
func (*MockClient) AuthenticateToken ¶
AuthenticateToken Verifies provided token and if valid, extracts eHRID from it.
func (*MockClient) CustomToken ¶
func (c *MockClient) CustomToken(uid string) (string, error)
CustomToken creates a signed custom authentication token with the specified user ID.