set

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(t Token) ([]byte, error)

func ParseSubToIp

func ParseSubToIp(sub string) (net.IP, error)

Types

type Token

type Token struct {
	// Subject
	// always an ip address
	SUB     string `json:"sub"`
	COUNTRY string `json:"subCountry"`
	ISS     string `json:"iss"`
	// The time at which the event occurred.
	IAT int64 `json:"iat"`
	// id of the set
	JTI string `json:"jti"`
	// Audience
	AUD *[]string `json:"aud,omitempty"`
	// Time of event
	TOE int64 `json:"toe"`
	// events - the key has to be a uri
	Events map[string]map[string]interface{} `json:"events"`
}

Security Event Token Proposed by the IETF in RFC 8417

func (Token) GetIssuedAt

func (t Token) GetIssuedAt() time.Time

Jump to

Keyboard shortcuts

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