Skip to content

Latest commit

 

History

History
67 lines (63 loc) · 4.5 KB

arbitrary_resource_owner_graphql.md

File metadata and controls

67 lines (63 loc) · 4.5 KB

Extension Grant: arbitrary_resource_owner

GraphQL Support

This is a graphql variant of the original OAuth2 version.

GraphQL Client

Altair GraphQL Client

GraphQL Endpoint

https://localhost:44332/api/v1/GraphQL

query

query q($input: arbitrary_resource_owner!) {
  arbitrary_resource_owner(input: $input){
    access_token
    expires_in
    refresh_token
    token_type
  }
}

Variables

{
  "input": {
    "client_id": "arbitrary-resource-owner-client",
    "client_secret": "secret",
    "scope": "offline_access metal nitro aggregator_service.read_only",
    "arbitrary_claims":"{ 'role': ['application', 'limited'],'query':['dashboard', 'licensing'],'seatId':['1234abcd']}",
    "subject":"886bea3f-e025-4ab9-a811-e9b86f563668",
    "access_token_lifetime":3600,
      "arbitrary_amrs":"['agent:username:[email protected]','agent:challenge:fullSSN','agent:challenge:homeZip']",
"arbitrary_audiences":"['cat','dog']"
  }
}

or

{
  "input": {
    "client_id": "arbitrary-resource-owner-client",
    "client_secret": "secret",
    "scope": "offline_access metal nitro aggregator_service.read_only",
    "arbitrary_claims":"{ 'role': ['application', 'limited'],'query':['dashboard', 'licensing'],'seatId':['1234abcd']}",
    "access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6ImE3MjhhYTE5M2VhZTMyMzg0M2ZjNTZlOTNlN2MwZDFiIiwidHlwIjoiSldUIn0.eyJuYmYiOjE1NDAxNDQ4MTksImV4cCI6MTU0MDE0ODQxOSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NDQzMzIiLCJhdWQiOlsiaHR0cHM6Ly9sb2NhbGhvc3Q6NDQzMzIvcmVzb3VyY2VzIiwiYWdncmVnYXRvcl9zZXJ2aWNlLnJlYWRfb25seSIsIm1ldGFsIiwibml0cm8iLCJjYXQiLCJkb2ciXSwiY2xpZW50X2lkIjoiYXJiaXRyYXJ5LXJlc291cmNlLW93bmVyLWNsaWVudCIsInN1YiI6Ijg4NmJlYTNmLWUwMjUtNGFiOS1hODExLWU5Yjg2ZjU2MzY2OCIsImF1dGhfdGltZSI6MTU0MDE0NDgxOSwiaWRwIjoibG9jYWwiLCJyb2xlIjpbImFwcGxpY2F0aW9uIiwibGltaXRlZCJdLCJxdWVyeSI6WyJkYXNoYm9hcmQiLCJsaWNlbnNpbmciXSwic2VhdElkIjoiMTIzNGFiY2QiLCJzY29wZSI6WyJhZ2dyZWdhdG9yX3NlcnZpY2UucmVhZF9vbmx5IiwiYWdncmVnYXRvcl9zZXJ2aWNlLnJlYWRfb25seSIsIm1ldGFsIiwibWV0YWwiLCJuaXRybyIsIm5pdHJvIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbImFyYml0cmFyeV9yZXNvdXJjZV9vd25lciIsImFnZW50OnVzZXJuYW1lOmFnZW50MEBzdXBwb3J0dGVjaC5jb20iLCJhZ2VudDpjaGFsbGVuZ2U6ZnVsbFNTTiIsImFnZW50OmNoYWxsZW5nZTpob21lWmlwIl19.GZRkBntVngZdgpKnl1Ej-FV_UlZn65mVPuLfzcDcHVjaA8CRlPbSov0REyHHHtqc-5p1E_D0gOlTURLrhUCUp307VRGYtwa5bfNVYnJI8KCPYpPG0U5r4tM3NMOqK2WwMCVTg7BgKEhX85RDZIsG2caXj71XEdi7rSOkvT-Z5MhixYLmt8YbtVPRmIPBl7xneFc7tmFu34AkwNCLZYzdDzGVxcJBowDjjBWsy99fjExkNp6wUTW69wkbNuX0htNCrUUwGu6MJW_mRkL_6usLsG8m2mQWiw5Udd-LH2brfzcRZH-YAdCDVPuYfj5gOl0fyAFxa7HdzE-uYFyGYIhZ_A",
    "access_token_lifetime":3600,
      "arbitrary_amrs":"['agent:username:[email protected]','agent:challenge:fullSSN','agent:challenge:homeZip']",
"arbitrary_audiences":"['cat','dog']"
  }
}

Result

{
  "data": {
    "arbitrary_resource_owner": {
      "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImE3MjhhYTE5M2VhZTMyMzg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