handlers

package
v0.0.0-...-e86dacb Latest Latest
Warning

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

Go to latest
Published: May 27, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentUser

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

func Login

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

func NewHydraClient

func NewHydraClient() *auth.HydraClient

func SetHydraClient

func SetHydraClient(newClient *auth.HydraClient)

Types

type Error

type Error struct {
	Code           string `json:"code"`
	DefaultMessage string `json:"defaultMessage"`
}

type LoginResponse

type LoginResponse struct {
	// Mandatory if success, nil otherwise
	Token *oauth2.Token `json:"token,omitempty"`

	// Mandatory if success, nil otherwise
	User *secu.User `json:"user,omitempty"`

	Success bool `json:"success"`

	// Mandatory if not success, nil otherwise
	Error *Error `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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