navikt / mock-oauth2-server

A scriptable/customizable web server for testing HTTP clients using OAuth2/OpenID Connect or applications with a dependency to a running OAuth2 server (i.e. APIs requiring signed JWTs from a known issuer)
MIT License
240 stars 57 forks source link

Need to return customized JWTs for different client ids #675

Closed janitham closed 2 months ago

janitham commented 5 months ago

I want to return scopes and audiences by different client_id s of the token requests as follows, { "interactiveLogin": true, "httpServer": "NettyWrapper", "loginPagePath": "/app/login/login.example.html", "staticAssetsPath": "/app/static", "tokenCallbacks": [ { "issuerId": "issuer1", "tokenExpiry": 120, "requestMappings": [ { "requestParam": "client_id", "match": "service.all", "claims": { "aud": [ "anyAud" ], "scope": "myscopes" } } ] }

But this only works when the scope is given in the requestParam and the same scope is given in the token request as additional scopes (I use Postman).

image
github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 2 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.