mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-21 07:42:53 +00:00
refactor(openid/client): scope is not required for client assertions
This commit is contained in:
@@ -114,7 +114,6 @@ func (c client) MakeAssertion(expiration time.Duration) (string, error) {
|
||||
errs = append(errs, tok.Set(jwt.IssuerKey, clientCfg.GetClientID()))
|
||||
errs = append(errs, tok.Set(jwt.SubjectKey, clientCfg.GetClientID()))
|
||||
errs = append(errs, tok.Set(jwt.AudienceKey, providerCfg.Issuer))
|
||||
errs = append(errs, tok.Set("scope", clientCfg.GetScopes().String()))
|
||||
errs = append(errs, tok.Set(jwt.IssuedAtKey, iat))
|
||||
errs = append(errs, tok.Set(jwt.ExpirationKey, exp))
|
||||
errs = append(errs, tok.Set(jwt.JwtIDKey, uuid.New().String()))
|
||||
|
||||
@@ -40,10 +40,6 @@ func TestMakeAssertion(t *testing.T) {
|
||||
assert.Equal(t, "some-client-id", assertion.Issuer())
|
||||
assert.Equal(t, "some-client-id", assertion.Subject())
|
||||
|
||||
scps, ok := assertion.Get("scope")
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, "openid", scps)
|
||||
|
||||
assert.True(t, assertion.IssuedAt().Before(time.Now()))
|
||||
assert.True(t, assertion.Expiration().After(time.Now()))
|
||||
assert.True(t, assertion.Expiration().Before(time.Now().Add(expiry)))
|
||||
|
||||
Reference in New Issue
Block a user