/Abc.IdentityModel.v2

IdentityModel extensions for .Net

Primary LanguageC#Apache License 2.0Apache-2.0

Azure Active Directory IdentityModel Extensions for .NET

Decryption

Enable decryption of encrypted SAML1.1 and SAML2.0 tokens

services
.AddAuthentication()
.AddWsFederation(options =>
    options.TokenValidationParameters.TokenDecryptionKey = new X509SecurityKey(serviceCertificate);
    options.SecurityTokenHandlers = new Collection<ISecurityTokenValidator>() {
                new Abc.IdentityModel.Tokens.Saml2.Saml2SecurityTokenHandler(),
                new Abc.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler(),
            }
);