auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MPL-2.0 Imports: 3 Imported by: 3

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 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.

Jump to

Keyboard shortcuts

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