Documentation
¶
Index ¶
- Constants
- func GetToken(r *http.Request) string
- func GetUserId(r *http.Request) string
- func RequestToJsonObject(req *http.Request, jsonDoc interface{}) error
- type AuthRoute
- func (a *AuthRoute) AuthHandler(h http.Handler) http.Handler
- func (a *AuthRoute) AuthHandlerFunc(next http.HandlerFunc) http.Handler
- func (a *AuthRoute) AuthMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (a *AuthRoute) Login(w http.ResponseWriter, req *http.Request)
- func (a *AuthRoute) RefreshToken(w http.ResponseWriter, req *http.Request)
- func (a *AuthRoute) Signin(w http.ResponseWriter, req *http.Request)
Constants ¶
View Source
const ( TokenKey = "token" UserKey = "user" )
Variables ¶
This section is empty.
Functions ¶
func RequestToJsonObject ¶
Types ¶
type AuthRoute ¶
type AuthRoute struct {
// contains filtered or unexported fields
}
func NewAuthRoute ¶
func NewAuthRoute(store store.UserRepository, opt jwt.Options) *AuthRoute
func (*AuthRoute) AuthHandler ¶
Auth Handler for net/http
func (*AuthRoute) AuthHandlerFunc ¶
func (a *AuthRoute) AuthHandlerFunc(next http.HandlerFunc) http.Handler
func (*AuthRoute) AuthMiddleware ¶
func (a *AuthRoute) AuthMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Auth middleware for negroni
func (*AuthRoute) RefreshToken ¶
func (a *AuthRoute) RefreshToken(w http.ResponseWriter, req *http.Request)
Directories
¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/boltdb/bolt
Package bolt implements a low-level key/value store in pure Go.
|
Package bolt implements a low-level key/value store in pure Go. |
_workspace/src/github.com/dgrijalva/jwt-go
Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html See README.md for more info.
|
Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html See README.md for more info. |
_workspace/src/github.com/dgrijalva/jwt-go/cmd/jwt
A useful example app.
|
A useful example app. |
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
|
Package context stores values shared during a request lifetime. |
_workspace/src/golang.org/x/crypto/pbkdf2
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
|
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0. |
_workspace/src/golang.org/x/crypto/scrypt
Package scrypt implements the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" (http://www.tarsnap.com/scrypt/scrypt.pdf).
|
Package scrypt implements the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" (http://www.tarsnap.com/scrypt/scrypt.pdf). |
Click to show internal directories.
Click to hide internal directories.