コード例 #1
0
        /// <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);
        }
コード例 #2
0
ファイル: WMIEventsFixture.cs プロジェクト: smillea1/NCS-V1-1
 private void FireSecurityRoleLoadEvent()
 {
     SecurityRoleLoadEvent.Fire(testMessage);
 }
コード例 #3
0
 private void FireSecurityRoleLoadEvent()
 {
     SecurityRoleLoadEvent.Fire("test");
 }