auth

Paddy 2014-08-13 Parent:244ac84003b3 Child:fc5df8e68c7b

11:9a1e62c24903 Go to Latest

auth/context.go

Add a bunch of TODOs. Let's be realistic about what still needs to be done and tag it appropriately.

History
1 package auth
3 import (
4 "io"
5 "log"
6 )
8 type Context struct {
9 Config ServerConfig
10 Clients ClientStore
11 Tokens TokenStore
12 Profiles ProfileStore
13 Log *log.Logger
14 }
16 func (c Context) RenderError(w io.Writer, err error) {
17 // TODO: write error to w in a template
18 }
20 func (c Context) RenderJSONError(w io.Writer, code, description, baseURI string) {
21 // TODO: write error to w in json formatting
22 }
24 func (c Context) RenderConfirmation(w io.Writer) {
25 // TODO: render HTML confirmation page
26 }
28 func (c Context) RenderLogin(w io.Writer) {
29 // TODO: render HTML login page
30 }
32 func (c Context) RenderJSONToken(w io.Writer, data AccessData) {
33 // TODO: render token to w in json formatting
34 }