Skip to content

Commit

Permalink
chore: synchronize workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Mar 13, 2024
1 parent 624c2d9 commit de0ec4c
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"grant_types": [
"refresh_token"
],
"payload": {}
"payload": {
"grant_type": [
"refresh_token"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"grant_types": [
"refresh_token"
],
"payload": {}
"payload": {
"grant_type": [
"refresh_token"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"grant_types": [
"refresh_token"
],
"payload": {}
"payload": {
"grant_type": [
"refresh_token"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"grant_types": [
"refresh_token"
],
"payload": {}
"payload": {
"grant_type": [
"refresh_token"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"grant_types": [
"refresh_token"
],
"payload": {}
"payload": {
"grant_type": [
"refresh_token"
]
}
}
}
5 changes: 4 additions & 1 deletion oauth2/oauth2_client_credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ func TestClientCredentials(t *testing.T) {
require.NotEmpty(t, hookReq.Request)
require.ElementsMatch(t, hookReq.Request.GrantedScopes, expectedGrantedScopes)
require.ElementsMatch(t, hookReq.Request.GrantedAudience, expectedGrantedAudience)
require.Equal(t, hookReq.Request.Payload, map[string][]string{})
require.Equal(t, hookReq.Request.Payload, map[string][]string{
"grant_type": {"client_credentials"},
"scope": {"foobar"},
})

claims := map[string]interface{}{
"hooked": true,
Expand Down
6 changes: 5 additions & 1 deletion oauth2/oauth2_jwt_bearer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ func TestJWTBearer(t *testing.T) {

expectedGrantedScopes := []string{client.Scope}
expectedGrantedAudience := []string{audience}
expectedPayload := map[string][]string(map[string][]string{"assertion": {token}})
expectedPayload := map[string][]string{
"assertion": {token},
"grant_type": {"urn:ietf:params:oauth:grant-type:jwt-bearer"},
"scope": {"offline_access"},
}

var hookReq hydraoauth2.TokenHookRequest
require.NoError(t, json.NewDecoder(r.Body).Decode(&hookReq))
Expand Down

0 comments on commit de0ec4c

Please sign in to comment.