/// <summary> /// Verifies the <see cref="IIdentity"/> object and wraps it inside /// a new <see cref="GenericPrincipal"/> object along with any security /// roles the user is a member of. /// </summary> /// <param name="userIdentity">An <see cref="IIdentity"/> object /// representing an authenticated user. /// </param> /// <returns> /// If successfull, returns the populated <see cref="IPrincipal"/> object. /// </returns> public IPrincipal GetRoles(IIdentity userIdentity) { ValidateParameters(userIdentity); string[] userRoles = CollectAllUserRoles(userIdentity); GenericPrincipal userPrincipal = new GenericPrincipal(userIdentity, userRoles); SecurityRoleLoadEvent.Fire(userIdentity.Name); return(userPrincipal); }
private void FireSecurityRoleLoadEvent() { SecurityRoleLoadEvent.Fire(testMessage); }
private void FireSecurityRoleLoadEvent() { SecurityRoleLoadEvent.Fire("test"); }