/// <summary> /// Finds a token policy that matches the user identity specified. /// </summary> public UserTokenPolicy FindUserTokenPolicy(UserTokenType tokenType, string issuedTokenType) { // construct issuer type. string issuedTokenTypeText = issuedTokenType; // find matching policy. foreach (UserTokenPolicy policy in m_userIdentityTokens) { // check token type. if (tokenType != policy.TokenType) { continue; } // check issuer token type. if (issuedTokenTypeText != policy.IssuedTokenType) { continue; } return policy; } // no policy found return null; }
/// <summary> /// Finds a token policy that matches the user identity specified. /// </summary> public UserTokenPolicy FindUserTokenPolicy(UserTokenType tokenType, XmlQualifiedName issuedTokenType) { if (issuedTokenType == null) { return FindUserTokenPolicy(tokenType, (string)null); } return FindUserTokenPolicy(tokenType, issuedTokenType.Namespace); }
public UserTokenItem(UserTokenType tokenType) { Policy = new UserTokenPolicy(tokenType); }
/// <summary> /// Creates an empty token policy with the specified token type. /// </summary> public UserTokenPolicy(UserTokenType tokenType) { Initialize(); m_tokenType = tokenType; }
/// <inheritdoc/> public IApplicationConfigurationBuilderServerSelected AddUserTokenPolicy(UserTokenType userTokenType) { ApplicationConfiguration.ServerConfiguration.UserTokenPolicies.Add(new UserTokenPolicy(userTokenType)); return(this); }