コード例 #1
0
ファイル: UserManager.cs プロジェクト: jmlothian/LCHARMS
        public static bool AddChildIdentity(string ParentLRI, string username, string ChildUserLRI, string passwordhash, string ChildPinHash, string KeyFromChild, IDRequestInfo request, bool IsGroup=false)
        {
            if (RequestedIDs[request.GUID].ReservationKey == request.ReservationKey)
            {
                LRI parentParsedLRI = new LRI(ParentLRI);
                LRI childParsedLRI = new LRI(ChildUserLRI);
                UserInfo info = new UserInfo();
                info.Identity.DomainLRI = DomainLRI;
                info.Identity.OwnerDomainLRI = DomainLRI;
                info.Identity.ParentDomainLRI = parentParsedLRI.LRIDomain;
                info.Identity.ParentUserID = parentParsedLRI.DocumentID;
                info.Identity.UserID = childParsedLRI.DocumentID;
                info.Identity.Username = username;
                info.Identity.UserLRI = childParsedLRI.LRIString;
                info.passwordHash = passwordhash;
                info.pinHash = ChildPinHash;
                info.Identity.KeyForParent = KeyFromChild;
                Identities[info.Identity.UserLRI] = info;
                Usernames.Add(username);
                RequestedIDs.Remove(request.GUID);

                SaveIdentity(childParsedLRI);
                return true;
            }
            return false;
        }
コード例 #2
0
ファイル: UserManager.cs プロジェクト: jmlothian/LCHARMS
 public static IDRequestInfo ReserveGUID(string reservationKey)
 {
     IDRequestInfo info = new IDRequestInfo();
     info.ReservationKey = reservationKey;
     info.GUID = LDocManager.RequestGUID();
     RequestedIDs[info.GUID] = info;
     return info;
 }