auth

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTokenTooShort is returned for token shorter than 200 b
	ErrTokenTooShort = errors.New("token is too short to be valid")
	// ErrTokenToolong is returned for token longer than 4096 b
	ErrTokenToolong = errors.New("token is too large to be valid")
	// ErrEmptyToken is returned for empty token string
	ErrEmptyToken = errors.New("token file is empty")
	// ErrTokenFileNotFound is returned when token file not found
	ErrTokenFileNotFound = errors.New("authentication token file not found")
	// ErrCouldntReadFile is returned for issues when reading file
	ErrCouldntReadFile = errors.New("couldn't read your Sylabs authentication token")
)

Functions

func ReadToken

func ReadToken(tokenPath string) (token string, err error)

ReadToken reads a sylabs JWT auth token from a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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