public FederatedAPI.implementation.ApproveFederateResponse ApproveFederate(FederatedAPI.implementation.ApproveFederateRequest request)
        {
            ApproveFederateResponse response = new ApproveFederateResponse();

            if (request.OrganizationPOCEmail != AdminUsername)
            {
                response.message = "Only the Federation Admin may approve this federate.";
                return(response);
            }
            if (request.OrganizationPOCPassword != AdminPassword)
            {
                response.message = "Incorrect Federation Admin password.";
                return(response);
            }
            FederateRecord f = mFederateRegister.GetFederateRecord(request.NamespacePrefix);

            f.ActivationState = FederateState.Active;
            mFederateRegister.UpdateFederateRecord(f);
            response.message = "The federate has been activated";
            return(response);
        }
Esempio n. 2
0
 public FederatedAPI.implementation.ApproveFederateResponse ApproveFederate(FederatedAPI.implementation.ApproveFederateRequest request)
 {
     ApproveFederateResponse response = new ApproveFederateResponse();
     if (request.OrganizationPOCEmail != AdminUsername)
     {
         response.message = "Only the Federation Admin may approve this federate.";
         return response;
     }
     if(request.OrganizationPOCPassword != AdminPassword)
     {
         response.message = "Incorrect Federation Admin password.";
         return response;
     }
         FederateRecord f = mFederateRegister.GetFederateRecord(request.NamespacePrefix);
         f.ActivationState = FederateState.Active;
         mFederateRegister.UpdateFederateRecord(f);
     response.message = "The federate has been activated";
     return response;
 }