login

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunOpenCmd

func RunOpenCmd(ctx context.Context, input string) error

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken string `json:"access_token"`
	PublicKey   string `json:"pub_key"`
	Nonce       string `json:"nonce"`
}

type Encryption

type Encryption struct {
	// contains filtered or unexported fields
}

func NewEncryption

func NewEncryption() (Encryption, error)

NewEncryption creates a new Encryption struct.

func (*Encryption) DecryptAccessToken

func (enc *Encryption) DecryptAccessToken(accessToken string, publicKey string, nonce string) (string, error)

decryptAccessToken decrypts the access token using the private key and nonce.

func (*Encryption) EncodedPublicKey

func (enc *Encryption) EncodedPublicKey() string

encodedPublicKey returns the public key as a hex string.

Jump to

Keyboard shortcuts

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