Does the library cache attributes anywhere?

This is a long shot, but after successfully logging in, I was wondering if it is possible to use a subject ID to get all the attributes back out of the library? I realize the claims are in the cookie if set up correctly but in many cases I have verified the request via a JWT and inside I have the sub and need to get all the users info.

Short of storing them after mapping, what are my options?

Question, how do I clear the internal saml library cache??

I implemented my own ISamlClaimFactory and I intend to cache the claims in my own SQL server along with the userId. I want to make sure SamlClaimFactory.Create gets called every single time the user is challenged and the session is re-established.

We don’t cache SAML attributes. We make them available when you call ReceiveSso and it’s up to your application to process or store them as required.
The ISamlClaimFactory is only used with the SAML authentication middleware. If you’re using the SAML API (eg ReceiveSso) it’s not used.
The ISamlClaimFactory.Create method is called each time a SAML response is received at the assertion consumer service endpoint (ie each time an SSO occurs).

[quote]
ComponentSpace - 1/23/2018
We don't cache SAML attributes. We make them available when you call ReceiveSso and it's up to your application to process or store them as required.
The ISamlClaimFactory is only used with the SAML authentication middleware. If you're using the SAML API (eg ReceiveSso) it's not used.
The ISamlClaimFactory.Create method is called each time a SAML response is received at the assertion consumer service endpoint (ie each time an SSO occurs).
[/quote]

Thanks! Yes we are only using the middleware.

If this helps anyone else: We are using it as an external login provider with IdentityServer4. As of now, we have created a table to hold all attributes stored on the ClaimsPrincipal by your middleware. During calls to the ProfileService http://docs.identityserver.io/en/release/reference/profileservice.html?highlight=profile%20service we query the table and return the claims.

Thanks for sharing that information.