feat(op): allow scope without openid (#613)
This changes removes the requirement of the openid scope to be set for all token requests. As this library also support OAuth2-only authentication mechanisms we still want to sanitize requested scopes, but not enforce the openid scope. Related to https://github.com/zitadel/zitadel/discussions/8068
This commit is contained in:
parent
9ecdd0cf9a
commit
a7b5355580
2 changed files with 8 additions and 36 deletions
|
@ -137,11 +137,6 @@ func TestValidateAuthRequest(t *testing.T) {
|
|||
args{&oidc.AuthRequest{}, mock.NewMockStorageExpectValidClientID(t), nil},
|
||||
oidc.ErrInvalidRequest(),
|
||||
},
|
||||
{
|
||||
"scope openid missing fails",
|
||||
args{&oidc.AuthRequest{Scopes: []string{"profile"}}, mock.NewMockStorageExpectValidClientID(t), nil},
|
||||
oidc.ErrInvalidScope(),
|
||||
},
|
||||
{
|
||||
"response_type missing fails",
|
||||
args{&oidc.AuthRequest{Scopes: []string{"openid"}}, mock.NewMockStorageExpectValidClientID(t), nil},
|
||||
|
@ -287,16 +282,6 @@ func TestValidateAuthReqScopes(t *testing.T) {
|
|||
err: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"scope openid missing fails",
|
||||
args{
|
||||
mock.NewClientExpectAny(t, op.ApplicationTypeWeb),
|
||||
[]string{"email"},
|
||||
},
|
||||
res{
|
||||
err: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"scope ok",
|
||||
args{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue