Skip to content

Commit

Permalink
Add proper token contents
Browse files Browse the repository at this point in the history
  • Loading branch information
fdelavega committed Oct 4, 2024
1 parent 2cf5134 commit 0d78dce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
context: .
file: ./docker/Dockerfile
tags: |
fiware/biz-ecosystem-logic-proxy:9.7.0-rc4
fiware/biz-ecosystem-logic-proxy:9.7.0-rc5
push: ${{ github.ref == 'refs/heads/feat/oidc-verifier' }}

- name: Image digest
Expand Down
8 changes: 7 additions & 1 deletion lib/strategies/passport-vc.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class VCStrategy extends Strategy {

this.allowedRoles = options.allowedRoles;
this.verifierTokenURL = options.verifierTokenURL;
this.verifierHost = options.verifierHost;
this.redirectURI = options.redirectURI;
this.isRedirection = options.isRedirection;
this.clientID = options.clientID;
Expand Down Expand Up @@ -205,7 +206,12 @@ class VCStrategy extends Strategy {
}

requestTokenWithClientSign(req, authCode) {
const tokenInfo = {}
const tokenInfo = {
'iss': this.clientID,
'aud': this.verifierHost,
'sub': this.clientID,
'exp': Math.floor(Date.now() / 1000) + 30
}

try {
console.log('Building eliptic')
Expand Down
1 change: 1 addition & 0 deletions lib/strategies/vc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function strategy(config) {

function buildStrategy(callback) {
const params = {
verifierHost: config.verifierHost,
verifierTokenURL: config.verifierHost + config.verifierTokenPath,
verifierJWKSURL: config.verifierHost + config.verifierJWKSPath,
redirectURI: config.callbackURL,
Expand Down

0 comments on commit 0d78dce

Please sign in to comment.