auth

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KeyringService is the service the credential belongs to
	KeyringService = "sectionctl"
	// KeyringUser is the user of the credential
	KeyringUser = "aperture.section.io"
)

Functions

func GetCredential

func GetCredential(endpoint string) (token string, err error)

GetCredential returns a token for authenticating to the Section API

func IsCredentialRecorded

func IsCredentialRecorded(s, u string) bool

IsCredentialRecorded returns if API credentials have been recorded

func PromptForCredential

func PromptForCredential(in io.Reader, out io.Writer) (token string, err error)

PromptForCredential interactively prompts the user for a credential to authenticate to the Section API

func Setup

func Setup(endpoint string) (err error)

Setup ensures authentication is set up

func WriteCredential

func WriteCredential(endpoint, token string) (err error)

WriteCredential saves Section API credentials to a persistent store

Types

This section is empty.

Jump to

Keyboard shortcuts

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