auth

package
v0.0.0-...-de99981 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2014 License: GPL-3.0 Imports: 9 Imported by: 12

Documentation

Overview

Provides helpers for authentication & authorization via HTTP. Outlet credentials are encrypted and signed in the authorization payload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(s string) (string, error)

func EncryptAndSign

func EncryptAndSign(b []byte) ([]byte, error)

Use the first valid key to sign b. Returns error if no key is able to sign b.

func Parse

func Parse(authLine string) (string, error)

Extract the username and password from the authorization line of an HTTP header. This function will handle the parsing and decoding of the line.

func ServeHTTP

func ServeHTTP(w http.ResponseWriter, r *http.Request)

Types

This section is empty.

Jump to

Keyboard shortcuts

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