Better signing error, setup api test certs.
This commit is contained in:
parent
3203c63237
commit
50c09481ec
2 changed files with 2 additions and 1 deletions
|
@ -28,6 +28,7 @@ var (
|
|||
|
||||
func setup() {
|
||||
store = datastore.NewMockDatastore()
|
||||
SetupCerts("../keys/")
|
||||
resp, _ := httpClient.PostForm(apiClient.BaseURL.String()+"authenticate/",
|
||||
url.Values{"username": {"test_user"}, "password": {"password"}})
|
||||
defer resp.Body.Close()
|
||||
|
|
|
@ -77,7 +77,7 @@ func serveAuthenticateUser(w http.ResponseWriter, r *http.Request) error {
|
|||
tokenString, err := t.SignedString(signKey)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return errWhileSigningToken
|
||||
return err
|
||||
}
|
||||
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
|
|
Reference in a new issue