add test for requested scope presence
This commit is contained in:
parent
44b418c771
commit
23df01e826
1 changed files with 6 additions and 0 deletions
|
|
@ -242,6 +242,11 @@ func TestRefreshAccessToken(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
if r.FormValue("scope") != "test-scope" {
|
||||
http.Error(w, "invalid scope", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
resp := map[string]any{
|
||||
"access_token": "refreshed-access-token",
|
||||
"refresh_token": "refreshed-refresh-token",
|
||||
|
|
@ -254,6 +259,7 @@ func TestRefreshAccessToken(t *testing.T) {
|
|||
cfg := OAuthProviderConfig{
|
||||
Issuer: server.URL,
|
||||
ClientID: "test-client",
|
||||
Scopes: "test-scope",
|
||||
}
|
||||
|
||||
cred := &AuthCredential{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue