예제 #1
0
        public void SetCurrentActor(User u, bool permanent)
        {
            if (u == null)
            {
                _currentActor = new Guest();
                FormsAuthentication.SignOut();
                return;
            }

            _currentActor = new Principal(u);
            FormsAuthentication.SetAuthCookie(u.Id.ToString(), permanent);
        }
예제 #2
0
 /// <summary>
 /// Instantiates an instance of <see cref="AuthorizeActorResult"/>
 /// </summary>
 /// <param name="actorThatResultIsFor">The <see cref="ISecurityActor"/> that this <see cref="AuthorizeActorResult"/> pertains to.</param>
 public AuthorizeActorResult(ISecurityActor actorThatResultIsFor)
 {
     Actor = actorThatResultIsFor;
 }
예제 #3
0
파일: Securable.cs 프로젝트: JoB70/Bifrost
#pragma warning disable 1591 // Xml Comments

        public void AddActor(ISecurityActor actor)
        {
            _actors.Add(actor);
        }
예제 #4
0
 /// <summary>
 /// Instantiates an instance of <see cref="AuthorizeActorResult"/>
 /// </summary>
 /// <param name="actorThatResultIsFor">The <see cref="ISecurityActor"/> that this <see cref="AuthorizeActorResult"/> pertains to.</param>
 public AuthorizeActorResult(ISecurityActor actorThatResultIsFor)
 {
     Actor = actorThatResultIsFor;
 }
예제 #5
0
#pragma warning disable 1591 // Xml Comments

        public void AddActor(ISecurityActor actor)
        {
            _actors.Add(actor);
        }