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); }
/// <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; }
#pragma warning disable 1591 // Xml Comments public void AddActor(ISecurityActor actor) { _actors.Add(actor); }