auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

package auth is used to interact with the vlpoc authentication system. it relies on cluster configuration located in the passed context.Context, which can be set with the sys package.

Login will be the most useful function in this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(ctx context.Context, user, pass string) (context.Context, error)

Login uses a user/password to log into a vlpoc cluster. One must have been configured in ctx using sys.Config

Types

type Actor

type Actor struct {
	Name      string
	Namespace string
	Domain    string
	// contains filtered or unexported fields
}

Actor represents a user or other agent within a vlpoc system.

func GetActor

func GetActor(ctx context.Context) (a *Actor, ok bool)

GetActor returns the currently logged-in Actor, if any.

func ParseActor

func ParseActor(actor string) (*Actor, error)

ParseActor parses an actor from an actor string in the form of

name(/namespace)?(@domain)?

and returns an unauthenticated Actor.

func (*Actor) String

func (a *Actor) String() string

String prints the Actor in the same format parsed by ParseActor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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