auth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

Simple structure to hold authentication information

func FromString

func FromString(str string) (Auth, error)

Parse an authentication string (i.e. from AuthString) into an Auth struct

func List

func List(k Keyring) ([]Auth, error)

List all authentication keys in the keystore

func New

func New(hostname string, username string, usergroup string, location string, password []byte) Auth

func (Auth) BasicAuth

func (a Auth) BasicAuth() (runtime.ClientAuthInfoWriter, error)

Build the authentication string used for basic http authentication

func (Auth) Delete

func (a Auth) Delete(k Keyring) error

Delete the matching authentication in the keystore

func (Auth) Hostname

func (a Auth) Hostname() string

func (*Auth) Load

func (a *Auth) Load(k Keyring) error

Load the password for the matching authentication in the keystore

func (Auth) Save

func (a Auth) Save(k Keyring) error

Save the authentication data in the keystore

func (Auth) String

func (a Auth) String() (string, error)

Build the authentication string used for storing the password in the keystore

func (Auth) Validate

func (a Auth) Validate() (bool, error)

Validate authentication with the Tessitura API server at a.Hostname

type Keyring

type Keyring keyring.Keyring

Jump to

Keyboard shortcuts

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