auth

Paddy 2014-08-16 Parent:9a1e62c24903 Child:9fe684b33b3d

17:1f04b1146cad Go to Latest

auth/session.go

Implement CSRF prevention and pass info to confirmation. Implement CSRF prevention using the nosurf package. Note that the handler still needs to be wrapped before this will work. Pass info on the authorization being requested (namely the client and the scope) to the RenderConfirmation page so that the user can make an educated decision.

History
paddy@6 1 package auth
paddy@1 2
paddy@1 3 import "net/http"
paddy@1 4
paddy@2 5 func validateSession(r *http.Request, c Context) error {
paddy@11 6 // TODO: return an error if the user does not have a valid session
paddy@1 7 return nil
paddy@1 8 }