Interface ISamlClaimFactory
Creates claims from SAML assertions and vice versa.
Namespace: ComponentSpace.Saml2.Claims
Assembly: ComponentSpace.Saml2.dll
Syntax
public interface ISamlClaimFactory
Methods
CreateClaims(String, String, IList<SamlAttribute>)
Creates claims from the SAML user ID and SAML attributes.
Declaration
IList<Claim> CreateClaims(string partnerName, string userID, IList<SamlAttribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.String | partnerName | The partner provider name. |
System.String | userID | The SAML user ID. |
System.Collections.Generic.IList<SamlAttribute> | attributes | The SAML attributes. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.Security.Claims.Claim> | The claims. |
CreateSamlAttributes(String, ClaimsPrincipal)
Creates the SAML attributes from claims.
Declaration
IList<SamlAttribute> CreateSamlAttributes(string partnerName, ClaimsPrincipal claimsPrincipal)
Parameters
Type | Name | Description |
---|---|---|
System.String | partnerName | The partner provider name. |
System.Security.Claims.ClaimsPrincipal | claimsPrincipal | The claims principal. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<SamlAttribute> | The SAML attributes. |
CreateSamlUserID(String, ClaimsPrincipal)
Creates the SAML user ID from claims.
Declaration
string CreateSamlUserID(string partnerName, ClaimsPrincipal claimsPrincipal)
Parameters
Type | Name | Description |
---|---|---|
System.String | partnerName | The partner provider name. |
System.Security.Claims.ClaimsPrincipal | claimsPrincipal | The claims principal. |
Returns
Type | Description |
---|---|
System.String | The SAML user ID. |