Skip to content

Commit

Permalink
NPA-3627 Decode Auth Token
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPlowman committed Nov 7, 2024
1 parent c7c75c5 commit 97c51c5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Headers>
<Header name="accesstoken.auth_level">{toUpperCase(accesstoken.auth_level)}</Header>
<Header name="accesstoken.auth_user_id">{accesstoken.auth_user_id}</Header>
<Header name="accesstoken.auth_id_token">{accesstoken.id_token}</Header>
<Header name="accesstoken.auth_vot">{jwt.DecodeAccessTokenJWT.claim.vot}</Header>
</Headers>
</Add>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
Expand Down
4 changes: 4 additions & 0 deletions proxies/live/apiproxy/policies/DecodeAccessTokenJWT.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<DecodeJWT async="false" continueOnError="false" enabled="true" name="DecodeAccessTokenJWT">
<DisplayName>DecodeAccessTokenJWT</DisplayName>
<Source>accesstoken.id_token</Source>
</DecodeJWT>
3 changes: 3 additions & 0 deletions proxies/live/apiproxy/targets/target.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<Step>
<Name>AddProxyURL</Name>
</Step>
<Step>
<Name>DecodeAccessTokenJWT</Name>
</Step>
<Step>
<Name>AddUserAuthHeaders</Name>
</Step>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<AssignMessage async="false" continueOnError="false" enabled="true" name="AssignMessage.AddIssuerHeader">
<Add>
<Headers>
<Header name="NHSD-Identity-IdP">{jwt.DecodeJWT.FromJWTHeader.claim.issuer}</Header>
<Header name="NHSD-Identity-IdP">{jwt.DecodeJWT.accesstoken.id_token}</Header>
</Headers>
</Add>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
Expand Down

This file was deleted.

0 comments on commit 97c51c5

Please sign in to comment.