handlers

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: CC0-1.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// APIName ...
	APIName = "eqip"

	// APIVersion ...
	APIVersion = "v1"
)

Functions

func AllSections

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

AllSections handler will return a JSON object of all currently saved application information specifict to the account.

func BasicAuth

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

BasicAuth processes a users request to login with a Username and Password

func CORS

func CORS(h http.Handler) http.Handler

CORS Wraps an http handler with logic to handle cors requests. Specifies the allowed origins, methods and headers.

func DecodeJSON

func DecodeJSON(r io.Reader, v interface{}) error

DecodeJSON decodes a request body to the specified interface

func DeleteAttachment

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

DeleteAttachment will removed an attachment for the account.

func EncodeErrJSON

func EncodeErrJSON(w http.ResponseWriter, errors interface{}) error

EncodeErrJSON will return an error in JSON format.

func EncodeJSON

func EncodeJSON(w http.ResponseWriter, data interface{}) error

EncodeJSON encodes any object and writes it to a response writer

func Error

func Error(w http.ResponseWriter, r *http.Request, err error)

Error renders http error information

func GetAttachment

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

GetAttachment will retrieve an attachment for the account.

func Hash

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

Hash of the application data used to verify data integrity.

func JwtTokenRefresh

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

JwtTokenReferesh refreshes a given token.

func JwtTokenValidatorHandler

func JwtTokenValidatorHandler(w http.ResponseWriter, r *http.Request) error

JwtTokenValidatorHandler will validate a token or return an error.

func Logout

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

Logout will end the user session.

func RootHandler

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

rootHandler accepts GET requests to get all endpoints that the API supports.

func SamlCallbackHandler

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

SamlCallbackHandler is the returning entry point for authentication.

func SamlServiceHandler

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

SamlServiceHandler is the initial entry point for authentication.

func Save

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

Save a payload of information for the provided account.

func SaveAttachment

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

SaveAttachment will store an attachment for the account.

func Section

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

Section returns the data for one section of the application.

func StandardLogging

func StandardLogging(h http.Handler) http.Handler

StandardLogging middleware for HTTP handling.

func Status

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

Status returns the accounts current state.

func Submit

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

Submit the application package to the external web service for further processing.

func TwofactorHandler

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

TwofactorHandler is the initial entry and subscription for two-factor authentication.

func TwofactorResetHandler

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

TwofactorResetHandler allows for multiple factor authentication to be reset. NOTE: This should not be enabled on production environments.

func TwofactorVerifyHandler

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

TwofactorVerifyHandler verifies a token provided by the end user.

func Validate

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

Validate checks if an entire address is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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