Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Sustainsys.​Saml2.​Saml2P.​Saml2PSecurityTokenHandler
Assembly: Sustainsys.Saml2
Inheritance: object → Microsoft.IdentityModel.Tokens.SecurityTokenHandler → Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityTokenHandler → Saml2PSecurityTokenHandler
Somewhat ugly subclassing to be able to access some methods that are protected on Saml2SecurityTokenHandler. The public interface of Saml2SecurityTokenHandler expects the actual assertion to be signed, which is not always the case when using Saml2-P. The assertion can be embedded in a signed response. Or the signing could be handled at transport level.
Properties
Serializer
public
bool
SetDefaultTimesOnTokenCreation
public
int
TokenLifetimeInMinutes
public
bool
CanValidateToken
public
System.​Type
TokenType
public
bool
CanWriteToken
public
int
MaximumTokenSizeInBytes
Methods
protected
void
ProcessAuthenticationStatement​(Microsoft.IdentityModel.Tokens.Saml2.Saml2AuthenticationStatement statement,
System.Security.Claims.ClaimsIdentity subject,
string issuer)
statement
Authentication statement
subject
Claim subject
issuer
Assertion Issuer
Process authentication statement from SAML assertion. WIF chokes if the authentication statement
contains a DeclarationReference, so we clear this out before calling the base method
http://referencesource.microsoft.com/#System.IdentityModel/System/IdentityModel/Tokens/Saml2SecurityTokenHandler.cs,1970
ValidateToken​(string token,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters,
Microsoft.IdentityModel.Tokens.SecurityToken& validatedToken)
protected
void
ValidateSubject​(Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityToken samlToken,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
public
bool
CanReadToken​(System.Xml.XmlReader reader)
Inherited from Saml2SecurityTokenHandler
CreateToken​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor)
Inherited from Saml2SecurityTokenHandler
CreateToken​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor,
Microsoft.IdentityModel.Tokens.Saml2.AuthenticationInformation authenticationInformation)
Inherited from Saml2SecurityTokenHandler
protected
void
ValidateIssuerSecurityKey​(Microsoft.IdentityModel.Tokens.SecurityKey key,
Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityToken securityToken,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
protected
void
ValidateTokenReplay​(System.Nullable`1 expirationTime,
string securityToken,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
protected
void
ValidateConfirmationData​(Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityToken samlToken,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters,
Microsoft.IdentityModel.Tokens.Saml2.Saml2SubjectConfirmationData confirmationData)
Inherited from Saml2SecurityTokenHandler
ValidateSignature​(string token,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
protected
Microsoft.​IdentityModel.​Tokens.​SecurityKey
ResolveIssuerSigningKey​(string token,
Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityToken samlToken,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
ReadToken​(System.Xml.XmlReader reader,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
CreateConditions​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor)
Inherited from Saml2SecurityTokenHandler
CreateAdvice​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor)
Inherited from Saml2SecurityTokenHandler
CreateIssuerNameIdentifier​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor)
Inherited from Saml2SecurityTokenHandler
CreateAttribute​(System.Security.Claims.Claim claim)
Inherited from Saml2SecurityTokenHandler
CreateAttributeStatement​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor)
Inherited from Saml2SecurityTokenHandler
ConsolidateAttributes​(System.Collections.Generic.ICollection`1 attributes)
Inherited from Saml2SecurityTokenHandler
protected
string
CreateActorString​(System.Security.Claims.ClaimsIdentity actor)
Inherited from Saml2SecurityTokenHandler
CreateStatements​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor)
Inherited from Saml2SecurityTokenHandler
CreateStatements​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor,
Microsoft.IdentityModel.Tokens.Saml2.AuthenticationInformation authenticationInformation)
Inherited from Saml2SecurityTokenHandler
CreateAuthenticationStatement​(Microsoft.IdentityModel.Tokens.Saml2.AuthenticationInformation authenticationInformation)
Inherited from Saml2SecurityTokenHandler
CreateAuthorizationDecisionStatement​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor)
Inherited from Saml2SecurityTokenHandler
CreateSubject​(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor)
Inherited from Saml2SecurityTokenHandler
protected
void
ValidateConditions​(Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityToken samlToken,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
protected
void
SetClaimsIdentityActorFromAttribute​(Microsoft.IdentityModel.Tokens.Saml2.Saml2Attribute attribute,
System.Security.Claims.ClaimsIdentity identity,
string issuer)
Inherited from Saml2SecurityTokenHandler
protected
void
ProcessStatements​(System.Collections.Generic.ICollection`1 statements,
System.Security.Claims.ClaimsIdentity identity,
string issuer)
Inherited from Saml2SecurityTokenHandler
protected
void
ProcessSubject​(Microsoft.IdentityModel.Tokens.Saml2.Saml2Subject subject,
System.Security.Claims.ClaimsIdentity identity,
string issuer)
Inherited from Saml2SecurityTokenHandler
protected
void
ProcessAttributeStatement​(Microsoft.IdentityModel.Tokens.Saml2.Saml2AttributeStatement statement,
System.Security.Claims.ClaimsIdentity identity,
string issuer)
Inherited from Saml2SecurityTokenHandler
protected
void
ProcessAuthorizationDecisionStatement​(Microsoft.IdentityModel.Tokens.Saml2.Saml2AuthorizationDecisionStatement statement,
System.Security.Claims.ClaimsIdentity identity,
string issuer)
Inherited from Saml2SecurityTokenHandler
CreateClaimsIdentity​(Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityToken samlToken,
string issuer,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
protected
void
ValidateAudience​(System.Collections.Generic.IEnumerable`1 audiences,
Microsoft.IdentityModel.Tokens.SecurityToken securityToken,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
protected
string
ValidateIssuer​(string issuer,
Microsoft.IdentityModel.Tokens.SecurityToken securityToken,
Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters)
Inherited from Saml2SecurityTokenHandler
public
string
WriteToken​(Microsoft.IdentityModel.Tokens.SecurityToken securityToken)
Inherited from Saml2SecurityTokenHandler
public
void
WriteToken​(System.Xml.XmlWriter writer,
Microsoft.IdentityModel.Tokens.SecurityToken securityToken)
Inherited from Saml2SecurityTokenHandler
CreateSecurityTokenReference​(Microsoft.IdentityModel.Tokens.SecurityToken token,
bool attached)
Inherited from SecurityTokenHandler
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object