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 WithRole ¶ added in v0.2.5
func WithRole(role string) RegisterPGPPublicKeyOption
WithRole sets the role in the authpb.RegisterPublicKeyRequest. Only effective if skipUserRole is true.
func WithSkipUserRole ¶ added in v0.2.5
func WithSkipUserRole(skipUserRole bool) RegisterPGPPublicKeyOption
WithSkipUserRole sets the skipUserRole flag in the authpb.RegisterPublicKeyRequest. When true, the role set via WithRole is respected.