Skip to content

Commit

Permalink
fix: add strategies.access_token to configuration JSON schema (#1830)
Browse files Browse the repository at this point in the history
  • Loading branch information
trecloux authored Apr 30, 2020
1 parent eca9b2d commit f09d539
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .schema/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,14 @@
"DEPRECATED_HIERARCHICAL_SCOPE_STRATEGY"
],
"default": "wildcard"
},
"access_token": {
"type": "string",
"description": "Defines access token type. jwt is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens",
"enum": [
"opaque",
"jwt"
]
}
}
},
Expand Down
1 change: 1 addition & 0 deletions driver/configuration/provider_viper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func TestViperProviderValidates(t *testing.T) {

// strategies
assert.Equal(t, "exact", c.ScopeStrategy())
assert.Equal(t, "opaque", c.AccessTokenStrategy())

// ttl
assert.Equal(t, 2*time.Hour, c.ConsentRequestMaxAge())
Expand Down
1 change: 1 addition & 0 deletions internal/.hydra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ urls:

strategies:
scope: exact
access_token: opaque

ttl:
login_consent_request: 2h
Expand Down

0 comments on commit f09d539

Please sign in to comment.