I have client configured as
hydra clients get foo
{
"grant_types": [
"implicit",
"refresh_token",
"authorization_code",
"password",
"client_credentials"
],
"id": "foo",
"public": true,
"response_types": [
"code",
"id_token",
"token"
],
"scope": "hydra.* openid offline defined1 defined2"
}
When i issue for token
curl -X POST \
http://localhost:4444/oauth2/token \
-H 'authorization: Basic YWRtaW46ZGVtby1wYXNzd29yZA==' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&scope=hydra.fooo.bar.baz.zraz*%20openid%20offline%20hydra&client_id=foo&client_secret=foo'
I’m able to issue for token for any scope which falls into hydra.*
But my custom scopes can not be optained if those are outside of the hydra.*
curl -X POST \
http://localhost:4444/oauth2/token \
-H 'authorization: Basic YWRtaW46ZGVtby1wYXNzd29yZA==' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&scope=defined1&client_id=foo&client_secret=foo'
I receive
{
"error": "invalid_scope",
"error_description": "The requested scope is invalid, unknown, or malformed",
"status_code": 400
}
Just to mention i run the hydra with 5 minutes start up guide
hydra host --dangerous-auto-logon --dangerous-force-http --disable-telemetry