authority

package
v0.0.0-...-5aca00c Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuthorityDuplicated = errors.New("authority duplicated")
View Source
var ErrEmptyAuthority = errors.New("empty authority")
View Source
var ErrEmptyPrincipal = errors.New("empty principal")
View Source
var ErrNotFound = errors.New("not found")
View Source
var PayloadRoles = "roles"
View Source
var PayloadSignSecret = "signsecret"

Functions

This section is empty.

Types

type Agent

type Agent string

func (Agent) AgentData

func (a Agent) AgentData() (Agent, error)

func (Agent) String

func (a Agent) String() string

type AgentSource

type AgentSource interface {
	AgentData() (Agent, error)
}

type Auth

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

func NewAuth

func NewAuth(p Principal) *Auth

func (*Auth) Agent

func (a *Auth) Agent() Agent

func (*Auth) Authenticated

func (a *Auth) Authenticated() bool

func (*Auth) Authority

func (a *Auth) Authority() Authority

func (*Auth) Payloads

func (a *Auth) Payloads() *Payloads

func (*Auth) Principal

func (a *Auth) Principal() Principal

func (*Auth) String

func (a *Auth) String() string

func (*Auth) WithAgent

func (a *Auth) WithAgent(agent Agent) *Auth

func (*Auth) WithAuthority

func (a *Auth) WithAuthority(authority Authority) *Auth

func (*Auth) WithPayloads

func (a *Auth) WithPayloads(payloads *Payloads) *Auth

type AuthResult

type AuthResult interface {
	Auth() *Auth
}

type Authority

type Authority string

func (Authority) AuthorityData

func (a Authority) AuthorityData() (Authority, error)

func (Authority) String

func (a Authority) String() string

type AuthoritySource

type AuthoritySource interface {
	AuthorityData() (Authority, error)
}

type Expiration

type Expiration time.Time
var ExpirationNever *Expiration = nil

func (*Expiration) ExpirationData

func (e *Expiration) ExpirationData() (*Expiration, error)

func (*Expiration) Expired

func (e *Expiration) Expired() bool

type ExpirationSource

type ExpirationSource interface {
	ExpirationData() (*Expiration, error)
}

type HumanReadablePayloads

type HumanReadablePayloads map[string]string

func (HumanReadablePayloads) Payloads

func (p HumanReadablePayloads) Payloads() *Payloads

type Passphrase

type Passphrase string

func (Passphrase) PassphraseData

func (p Passphrase) PassphraseData() (Passphrase, error)

type PassphraseSource

type PassphraseSource interface {
	PassphraseData() (Passphrase, error)
}

type Payload

type Payload struct {
	Name string
	Data []byte
}

type Payloads

type Payloads []*Payload

func NewPayloads

func NewPayloads() *Payloads

func (*Payloads) Add

func (p *Payloads) Add(pl *Payload)

func (*Payloads) Clone

func (p *Payloads) Clone() *Payloads

func (*Payloads) HumanReadabe

func (p *Payloads) HumanReadabe() HumanReadablePayloads

func (*Payloads) Load

func (p *Payloads) Load(name string) []byte

func (*Payloads) LoadString

func (p *Payloads) LoadString(name string) string

func (*Payloads) Set

func (p *Payloads) Set(name string, data []byte)

type Principal

type Principal string

func (Principal) PrincipalData

func (p Principal) PrincipalData() (Principal, error)

func (Principal) String

func (p Principal) String() string

type PrincipalSource

type PrincipalSource interface {
	PrincipalData() (Principal, error)
}

Directories

Path Synopsis
service

Jump to

Keyboard shortcuts

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