auth
auth/http.go
Test all possible successful requests, fix query setting in test. Test all the possible successful requests for an authorization code grant. Fix a bug wherein the query string wasn't actually set for the test.
| paddy@51 | 1 package auth |
| paddy@51 | 2 |
| paddy@51 | 3 import ( |
| paddy@51 | 4 "log" |
| paddy@51 | 5 "net/http" |
| paddy@51 | 6 ) |
| paddy@51 | 7 |
| paddy@51 | 8 const getGrantTemplateName = "get_grant" |
| paddy@51 | 9 |
| paddy@51 | 10 func GetGrantHandler(w http.ResponseWriter, r *http.Request, context Context) { |
| paddy@51 | 11 w.WriteHeader(http.StatusOK) |
| paddy@51 | 12 err := context.Render(w, getGrantTemplateName, nil) |
| paddy@51 | 13 if err != nil { |
| paddy@51 | 14 log.Println("Error rendering template for GetGrantHandler:", err) |
| paddy@51 | 15 } |
| paddy@51 | 16 } |