consoleauth

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: AGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	ID         uuid.UUID `json:"id"`
	Email      string    `json:"email,omitempty"`
	Expiration time.Time `json:"expires,omitempty"`
}

Claims represents data signed by server and used for authentication

func FromJSON

func FromJSON(data []byte) (*Claims, error)

FromJSON returns Claims instance, parsed from JSON

func (*Claims) JSON

func (c *Claims) JSON() ([]byte, error)

JSON returns json representation of Claims

type Hmac

type Hmac struct {
	Secret []byte
}

Hmac is hmac256 based Signer

func (*Hmac) Sign

func (a *Hmac) Sign(data []byte) ([]byte, error)

Sign implements satellite signer

type Token

type Token struct {
	Payload   []byte
	Signature []byte
}

Token represents authentication data structure

func FromBase64URLString

func FromBase64URLString(token string) (Token, error)

FromBase64URLString creates Token instance from base64URLEncoded string representation

func (Token) String

func (t Token) String() string

String returns base64URLEncoded data joined with .

Jump to

Keyboard shortcuts

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