public IGroupPrincipal Create(IPrincipalContext principalContext, string groupName) { var groupPrincipal = GroupPrincipal.FindByIdentity(principalContext.PrincipalContextInstance, groupName); return(new GroupPrincipalWrap(groupPrincipal)); }
public BasicAuthentication(IAuthenticationSession session, IPrincipalContext context, IPrincipalBuilder builder, ICredentialsAuthenticator authenticator) { _session = session; _context = context; _builder = builder; _authenticator = authenticator; }
public BasicAuthentication(IAuthenticationSession session, IPrincipalContext context, IPrincipalBuilder builder, ICredentialsAuthenticator authenticator, ILockedOutRule lockedOutRule) { _session = session; _context = context; _builder = builder; _authenticator = authenticator; _lockedOutRule = lockedOutRule; }
public static PrincipalContext GetPrincipalContext(this object value, IPrincipalContext principalContext, bool throwExceptionIfUnsuccessful) { if (value == null) { throw new ArgumentNullException("value"); } return(Instance.GetPrincipalContext(principalContext, throwExceptionIfUnsuccessful)); }
public SamlDirector(IPrincipalBuilder principalBuilder, IAuthenticationSession session, IPrincipalContext context) { _principalBuilder = principalBuilder; _session = session; _context = context; _result = new AuthResult { Success = false, Continuation = FubuContinuation.RedirectTo(new LoginRequest { Message = SamlValidationKeys.UnableToValidationSamlResponse }, "GET") }; }
public PrincipalSearchResult(IEnumerable <T> items, IPrincipalContext principalContext, bool disposePrincipalContextOnDispose) { if (items == null) { throw new ArgumentNullException("items"); } if (principalContext == null) { throw new ArgumentNullException("principalContext"); } this._disposePrincipalContextOnDispose = disposePrincipalContextOnDispose; this._items = items.ToArray(); // To avoid having problems with PrincipalSearchResult already being disposed. this._principalContext = principalContext; }
public virtual PrincipalContext GetPrincipalContext(IPrincipalContext principalContext, bool throwExceptionIfUnsuccessful) { if (principalContext == null) { return(null); } var principalContextInternal = principalContext as IPrincipalContextInternal; if (principalContextInternal != null) { return(principalContextInternal.PrincipalContext); } if (throwExceptionIfUnsuccessful) { throw new NotImplementedException(string.Format(CultureInfo.InvariantCulture, "The object of type \"{0}\" does not implement \"{1}\".", principalContext.GetType(), typeof(IPrincipalContextInternal))); } return(null); }
public MembershipAuthentication(IAuthenticationSession session, IPrincipalContext context, IMembershipRepository membership, ILockedOutRule lockedOutRule) { _membership = membership; _inner = new BasicAuthentication(session, context, this, this, lockedOutRule); }
/// <summary> /// /// </summary> /// <param name="principalContext"></param> /// <param name="groupName"></param> /// <returns></returns> public static IGroupPrincipal FindByIdentity(IPrincipalContext principalContext, string groupName) { return new GroupPrincipalWrap(GroupPrincipal.FindByIdentity(principalContext.PrincipalContextInstance, groupName)); }
public virtual PrincipalContext GetPrincipalContext(IPrincipalContext principalContext) { return(this.GetPrincipalContext(principalContext, true)); }
/// <summary> /// /// </summary> /// <param name="context"></param> /// <param name="identityType"></param> /// <param name="identityValue"></param> public void Add(IPrincipalContext context, IdentityType identityType, string identityValue) { this.principalCollection.Add(context.PrincipalContextInstance, identityType, identityValue); }
public AuthenticationContext(IPrincipalCreator principalCreator, IPrincipalContext principalContext) { this.principalCreator = principalCreator; this.principalContext = principalContext; }
/// <summary> /// /// </summary> /// <param name="principalContext"></param> /// <param name="groupName"></param> /// <returns></returns> public static IGroupPrincipal FindByIdentity(IPrincipalContext principalContext, string groupName) { return(new GroupPrincipalWrap(GroupPrincipal.FindByIdentity(principalContext.PrincipalContextInstance, groupName))); }
public IGroupPrincipal Create(IPrincipalContext principalContext, string groupName) { var groupPrincipal = GroupPrincipal.FindByIdentity(principalContext.PrincipalContextInstance, groupName); return new GroupPrincipalWrap(groupPrincipal); }