auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package auth provides routines to authenticate users on Plan 9 and related systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKey

func GetKey(params string) error

GetKey prompts the user for missing key information and passes the information to factotum. Params is an attribute-value-list.

func GetUserPassword

func GetUserPassword(getKey GetKeyFunc, format string, a ...interface{}) (string, string, error)

GetUserPassword returns the username and password for the key formatted using format and a. GetKey is called to obtain missing information (if any).

Types

type GetKeyFunc

type GetKeyFunc func(string) error

GetKeyFunc takes an attribute-value-list as argument. GetKey is an example implementation.

type RPC

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

RPC represents an opened factotum(4) rpc file.

func NewRPC

func NewRPC() (*RPC, error)

NewRPC creates and returns a new RPC.

func (*RPC) Call

func (rpc *RPC) Call(verb string, arg []byte) (string, []byte, error)

Call sends a RPC request to factotum and returns the response.

func (*RPC) Close

func (rpc *RPC) Close() error

Close closes the underlying rpc file.

Jump to

Keyboard shortcuts

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