Skip to content

Commit

Permalink
client_credentials should not generate a refresh token
Browse files Browse the repository at this point in the history
  • Loading branch information
RangelReale committed Oct 12, 2014
1 parent 1f4e975 commit 449d867
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion access.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func (s *Server) handleClientCredentialsRequest(w *Response, r *http.Request) *A
ret := &AccessRequest{
Type: CLIENT_CREDENTIALS,
Scope: r.Form.Get("scope"),
GenerateRefresh: true,
GenerateRefresh: false,
Expiration: s.Config.AccessExpiration,
HttpRequest: r,
}
Expand Down
4 changes: 2 additions & 2 deletions access_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func TestAccessClientCredentials(t *testing.T) {
t.Fatalf("Unexpected access token: %s", d)
}

if d := resp.Output["refresh_token"]; d != "r1" {
t.Fatalf("Unexpected refresh token: %s", d)
if d, dok := resp.Output["refresh_token"]; dok {
t.Fatalf("Refresh token should not be generated: %s", d)
}
}

0 comments on commit 449d867

Please sign in to comment.