actions

package
v0.0.0-...-fbbe154 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ENV = envy.Get("GO_ENV", "development")

ENV is used to help switch settings based on where the application is being run. Default is "development".

Functions

func App

func App() *buffalo.App

App is where all routes and middleware for buffalo should be defined. This is the nerve center of your application.

func RestrictedHandlerMiddleware

func RestrictedHandlerMiddleware(next buffalo.Handler) buffalo.Handler

RestrictedHandlerMiddleware searches and parses the jwt token in order to authenticate the request and populate the Context with the user contained in the claims.

func UsersLogin

func UsersLogin(c buffalo.Context) error

UsersLogin perform a login with the given credentials.

func UsersMe

func UsersMe(c buffalo.Context) error

UsersMe default implementation.

Types

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

LoginRequest represents a login form.

type User

type User struct {
	ID       string `json:"id"`
	Email    string `json:"email"`
	Password string `json:"-"` // don't serialize password field
}

User represents a user :)

Jump to

Keyboard shortcuts

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