public void RefreshTokenCredsTest(string propertyName, ParameterType parameterType, InputType inputType)
        {
            var getTokenReqeust = GenerateGetTokenCredRequest();
            var response        = (new DefaultManager(_testConnection)).Send <GetTokenResponse>(getTokenReqeust);

            PrAssume.That(response, PrIs.SuccessfulResponse(), "Could not get token to refresh. Actual response code is " + response.HttpStatusCode);

            ValidationTestUtility.PerformJsonValidationTest(_testConnection, propertyName, parameterType, inputType, new RefreshTokenRequest
            {
                ExpiresIn    = 600,
                InvalidAfter = 10800,
                Token        = response.Result.Token
            }, null);
        }
 public void GetTokenSamlTest(string propertyName, ParameterType parameterType, InputType inputType)
 {
     ValidationTestUtility.PerformJsonValidationTest(_testConnection, propertyName, parameterType, inputType, new GetTokenRequest
     {
         ExpiresIn    = 600,
         InvalidAfter = 10800,
         ExtPayload   = new { sessionKey = "qwer123" },
         Method       = "saml",
         Service      = "HRBC",
         Credentials  = new GetTokenRequest.CredentialsType
         {
             CompanyId   = Convert.ToInt32(AuthenticationInfoProvider.Current.DefaultPartition),
             UserLoginId = AuthenticationInfoProvider.Current.DefaultUserLogin
         }
     }, null);
 }
Пример #3
0
 public void CompanyLoginIdLoginTest(string propertyName, ParameterType parameterType, InputType inputType)
 {
     ValidationTestUtility.PerformJsonValidationTest(_testConnection, propertyName, parameterType, inputType, new LoginRequest {
         CompanyLoginId = AuthenticationInfoProvider.Current.DefaultCompanyName
     }, null);
 }
 public void GetTokenCredsTest(string propertyName, ParameterType parameterType, InputType inputType)
 {
     ValidationTestUtility.PerformJsonValidationTest(_testConnection, propertyName, parameterType, inputType, GenerateGetTokenCredRequest(), null);
 }
        public void CoreSettingUpdateTest(string propertyName, ParameterType parameterType, InputType inputType)
        {
            var creds = AuthenticationInfoProvider.GetAuthSpecForCurrentTest();

            ValidationTestUtility.PerformJsonValidationTest(_testConnection, propertyName, parameterType, inputType, GenerateSettingUpdateRequest(), creds);
        }
        public void UISettingUpdateTest(string propertyName, ParameterType parameterType, InputType inputType)
        {
            var creds = AuthenticationInfoProvider.GetAuthSpecForCurrentTest();

            ValidationTestUtility.PerformJsonValidationTest(AuthApiConnection.GetConnectionForCurrentTest(), propertyName, parameterType, inputType, GenerateSettingUpdateRequest(), creds, CommonConstants.SettingUIUrl);
        }