public bool Authenticate(NVIdentity identity) { if (string.IsNullOrEmpty(identity.Name) || string.IsNullOrEmpty(identity.Password)) { return(false); } return(FSUtil.Authenticate(identity)); }
/// <summary> /// Gets this instance. /// </summary> /// <returns></returns> internal static FSGlobalContext Get(NVIdentity identity) { //identity = identity ?? NVUserContext.Identity; var pool = _globalPools.GetOrAdd(identity.GetToken(), new Lazy <FSGlobalPool>(() => new FSGlobalPool(() => GenerateGlobal(identity), BrokerSettings.Default.GlobalPoolSize) )); var global = pool.Value.GetGlobal() as IFSGlobalObjects; return(new FSGlobalContext(identity, global)); }
public static bool Authenticate(NVIdentity identity) { var global = FSGlobalFactory.Get(identity); if (global != null) { identity.IsAuthenticated = true; FSGlobalFactory.Put(global); return(true); } return(false); }
public FSGlobalContext(NVIdentity identity, IFSGlobalObjects global) { Identity = identity; FSGlobal = global; }
public FSScope(NVIdentity identity) { FSGlobalContext = FSGlobalFactory.Get(identity); }
public static IFSGlobalObjects Authenticate(this IFSGlobalObjects global, NVIdentity identity) { cLoginFactory.Create(global).LoginServiceHost(identity.Name, identity.Password, identity.BusinessUnit); return(global); }
public FSGlobal(NVIdentity identity, IFSGlobalObjects global) { Identity = identity; Global = global; }
internal static IFSGlobalObjects GenerateGlobal(NVIdentity identity) { return(((IFSGlobalObjects)GlobalObjectManager.CreateGlobalObject(guid.NewGuid().Value)) .Authenticate(identity) .EnableCaching()); }