tokenfilewriter

package
v1.3.1-0...-2eb6d4b Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenFileWriter

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

TokenFileWriter is a mechanism to generates a token and writes it into a file specified by configuration

func NewWriter

NewWriter instantiates a TokenFileWriter instance

func (TokenFileWriter) CreateAndWrite

func (w TokenFileWriter) CreateAndWrite(rootToken string, tokenFilePath string,
	createTokenFunc tokencreatable.CreateTokenFunc) (tokencreatable.RevokeFunc, error)

CreateAndWrite generates a new token and writes it to the file specified by tokenFilePath the generation of the token requires root token privilege it overwrites the file if already exists returns error if anything fails during the whole process

Jump to

Keyboard shortcuts

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