Replies: 2 comments
-
I resolved like this...
|
Beta Was this translation helpful? Give feedback.
-
The latest version of |
Beta Was this translation helpful? Give feedback.
-
I resolved like this...
|
Beta Was this translation helpful? Give feedback.
-
The latest version of |
Beta Was this translation helpful? Give feedback.
-
Help request
After upgrading to current passport-saml and @types/passport-saml my deriving expires in code broke.. Likely missing something basic but seems to me that the type package is not complete for Assertion and Conditions...?
...
return new SamlStrategy.Strategy(samlConfig, (profile: SamlStrategy.Profile, done: VerifiedCallback) => {
const notBefore = new Date(profile.getAssertion().Assertion.Conditions[0].$.NotBefore)
const notOnOrAfter = new Date(samlResponse.getAssertion().Assertion.Conditions[0].$.NotOnOrAfter)
const expiresIn = (+notOnOrAfter - +notBefore) / 1000
return done(null, { iagProfile: convertSamlResponseToIagProfile(profile), expiresIn }, null)
})
...
Are we missing Type declarations ?
src/strategies/passport-saml-strategy.ts:113:63 - error TS2339: Property 'Conditions' does not exist on type 'unknown'.
113 const notBefore = new Date(profile.getAssertion().Assertion.Conditions[0].$.NotBefore)
~~~~~~~~~~
src/strategies/passport-saml-strategy.ts:114:66 - error TS2339: Property 'Conditions' does not exist on type 'unknown'.
114 const notOnOrAfter = new Date(profile.getAssertion().Assertion.Conditions[0].$.NotOnOrAfter)
Suggestions appreciated.
~~~~~~~~~~
Beta Was this translation helpful? Give feedback.
All reactions