auth

package
v0.0.0-...-0a45487 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertAuthorized

func AssertAuthorized(roleMask auth.RoleMask, spaceNode userspace.SpaceNode) func(cmd *cobra.Command, args []string)

func AssertLoggedIn

func AssertLoggedIn() func(cmd *cobra.Command, args []string)

func Authenticate

func Authenticate(config config.Config, loginMessages ...string) error

func AuthorizeDeviceAndUser

func AuthorizeDeviceAndUser(config config.Config) error

func ImportPrivateKey

func ImportPrivateKey(line *liner.State) (*crypto.RSAKey, error)

Types

type AWSCognitoJWT

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

func GetAuthenticatedToken

func GetAuthenticatedToken(config config.Config, forceLogin bool, loginMessages ...string) (*AWSCognitoJWT, error)

func NewAWSCognitoJWT

func NewAWSCognitoJWT(config config.Config) (*AWSCognitoJWT, error)

func (*AWSCognitoJWT) ConfigTimestamp

func (awsJWT *AWSCognitoJWT) ConfigTimestamp() int64

func (*AWSCognitoJWT) KeyTimestamp

func (awsJWT *AWSCognitoJWT) KeyTimestamp() int64

func (*AWSCognitoJWT) Preferences

func (awsJWT *AWSCognitoJWT) Preferences() *Preferences

func (*AWSCognitoJWT) UserID

func (awsJWT *AWSCognitoJWT) UserID() string

func (*AWSCognitoJWT) Username

func (awsJWT *AWSCognitoJWT) Username() string

type Preferences

type Preferences struct {
	PreferredName   string `json:"preferredName,omitempty"`
	EnableBiometric bool   `json:"enableBiometric"`
	EnableMFA       bool   `json:"enableMFA"`
	EnableTOTP      bool   `json:"enableTOTP"`
	RememberFor24h  bool   `json:"rememberFor24h"`
}

Jump to

Keyboard shortcuts

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