edge_auth

package module
v0.0.0-...-ef1c3aa Latest Latest
Warning

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

Go to latest
Published: May 18, 2019 License: MIT Imports: 9 Imported by: 0

README

Amamail-Edge-Auth

Build Status codecov Go Report Card GoDoc

Amamail-Edge-Auth is Akamai Edge Authorization Token in the HTTP Cookie, Query String and Header for Go.

Example


ACL(Access Control List) parameter option

Usage

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EdgeAuth

type EdgeAuth struct {
	// parameter name for the new token
	TokenName string

	// secret required to generate the token. It must be hexadecimal digit string with even-length
	Key string

	// to use to generate the token. (sha1, sha256, or md5)
	Algorithm string

	// IP Address to restrict this token to. Troublesome in many cases (roaming, NAT, etc) so not often used
	IP string

	// additional text added to the calculated digest.
	Payload string

	// the session identifier for single use tokens or other advanced cases.
	SessionID string

	/** what is the start time? */
	StartTime time.Time

	/** when does this token expire? It overrides {@code windowSeconds} */
	EndTime time.Time

	/** How long is this token valid for? */
	Expiration time.Duration

	/** character used to delimit token body fields. */
	FieldDelimiter string

	/** Character used to delimit acl. */
	AclDelimiter string

	/** causes strings to be url encoded before being used. */
	EscapeEarly bool

	/** print all parameters. */
	Verbose bool

	Logger Logger
}

func New

func New() *EdgeAuth

func (*EdgeAuth) GenerateACLToken

func (e *EdgeAuth) GenerateACLToken(acl string) (string, error)

type Logger

type Logger interface {
	Printf(format string, v ...interface{})
}

Jump to

Keyboard shortcuts

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