Documentation
¶
Overview ¶
Package auth provides client for authentication API.
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 for Management API .
func NewClient ¶
func NewClient(conn *grpc.ClientConn) *Client
NewClient builds a client out of gRPC connection.
func (*Client) AwaitPublicKeyConfirmation ¶
AwaitPublicKeyConfirmation waits for the public key with the given information to be confirmed for the given email.
func (*Client) ConfirmPublicKey ¶
ConfirmPublicKey confirms a PGP public key for the given identity. This endpoint requires a valid JWT token.
func (*Client) RegisterPGPPublicKey ¶
func (client *Client) RegisterPGPPublicKey(ctx context.Context, email string, publicKey []byte, opt ...RegisterPGPPublicKeyOption) (string, error)
RegisterPGPPublicKey registers a PGP public key for the given identity and returns the login URL. Registered public key will need to be verified before it can be used for signing.
type RegisterPGPPublicKeyOption ¶ added in v0.2.0
type RegisterPGPPublicKeyOption func(*authpb.RegisterPublicKeyRequest)
RegisterPGPPublicKeyOption customizes authpb.RegisterPublicKeyRequest.
func WithScopes ¶ added in v0.2.0
func WithScopes(scopes ...string) RegisterPGPPublicKeyOption
WithScopes sets the scopes in the authpb.RegisterPublicKeyRequest.
func WithSkipUserScopes ¶ added in v0.2.0
func WithSkipUserScopes(skipUserScopes bool) RegisterPGPPublicKeyOption
WithSkipUserScopes sets the skipUserScopes flag in the authpb.RegisterPublicKeyRequest. If true and no scopes are specified using WithScopes, the scopes of the user are assigned to the public key by the server.