auth

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MPL-2.0 Imports: 3 Imported by: 5

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

func (client *Client) AwaitPublicKeyConfirmation(ctx context.Context, publicKeyID string) error

AwaitPublicKeyConfirmation waits for the public key with the given information to be confirmed for the given email.

func (*Client) ConfirmPublicKey

func (client *Client) ConfirmPublicKey(ctx context.Context, publicKeyID string) error

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.

Jump to

Keyboard shortcuts

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