Examples of AuthenticationException


Examples of com.example.bookstore.service.AuthenticationException

        if (account == null) {

            //Retrieve and store the original URL.
            String url = request.getRequestURL().toString();
            WebUtils.setSessionAttribute(request, LoginController.REQUESTED_URL, url);
            throw new AuthenticationException("Authentication required.", "authentication.required");
        }
        return true;
    }
View Full Code Here

Examples of com.github.ebnew.ki4so.core.exception.AuthenticationException

    if(credential==null){
      throw new EmptyCredentialException();
    }
   
    //初始化的认证异常信息。
    AuthenticationException unAuthSupportedHandlerException = InvalidCredentialException.INSTANCE;
   
    //循环调用所有的认证处理器。
    if(authenticationHandlers!=null && authenticationHandlers.size()>0){
      for(AuthenticationHandler handler:authenticationHandlers){
        //认证处理器是否支持该凭据。
View Full Code Here

Examples of com.google.api.ads.common.lib.exception.AuthenticationException

    Exception apiException = new Exception();
    when(soapClientHandler.invokeSoapCall(soapCall)).thenReturn(soapCallReturn);
    when(soapCallReturn.getException()).thenReturn(apiException);
    when(tokenExpirationDetector.isTokenExpiredException(apiException)).thenReturn(true);
    when(dfaServiceDescriptor.getInterfaceClass()).thenReturn((Class) getClass());
    doThrow(new AuthenticationException(null, null) {})
        .when(dfaHeaderHandler).setHeaders(soapClient, dfaSession, dfaServiceDescriptor);

    assertSame(soapCallReturn, dfaServiceClient.callSoapClient(soapCall));

    verify(soapClientHandler, times(1)).invokeSoapCall(soapCall);
View Full Code Here

Examples of com.google.gdata.util.AuthenticationException

    String header = formAuthorizationHeader(onetimeUseToken, key, url, "GET");
    httpConn.setRequestProperty("Authorization", header);

    if (httpConn.getResponseCode() != HttpURLConnection.HTTP_OK) {
      throw new AuthenticationException(httpConn.getResponseCode() + ": "
                                        + httpConn.getResponseMessage());
    }

    // Parse the response
    String body =
View Full Code Here

Examples of com.google.gdata.util.AuthenticationException

    String header = formAuthorizationHeader(token, key, url, "GET");
    httpConn.setRequestProperty("Authorization", header);

    if (httpConn.getResponseCode() != HttpURLConnection.HTTP_OK) {
      throw new AuthenticationException(httpConn.getResponseCode() + ": "
                                        + httpConn.getResponseMessage());
    }

    String body =
      Characters.toString(
View Full Code Here

Examples of com.google.gdata.util.AuthenticationException

    String header = formAuthorizationHeader(token, key, url, "GET");
    httpConn.setRequestProperty("Authorization", header);

    if (httpConn.getResponseCode() != HttpURLConnection.HTTP_OK) {
      throw new AuthenticationException(httpConn.getResponseCode() + ": "
                                        + httpConn.getResponseMessage());
    }
  }
View Full Code Here

Examples of com.google.gdata.util.AuthenticationException

      case HttpURLConnection.HTTP_FORBIDDEN:
        throw new ServiceForbiddenException(httpConn);

      case HttpURLConnection.HTTP_UNAUTHORIZED:
        throw new AuthenticationException(httpConn);

      case HttpURLConnection.HTTP_NOT_MODIFIED:
        throw new NotModifiedException(httpConn);

      case HttpURLConnection.HTTP_PRECON_FAILED:
View Full Code Here

Examples of com.google.gdata.util.AuthenticationException

    String postOutput;
    try {
      URL url = new URL(loginProtocol + "://" + domainName + GOOGLE_LOGIN_PATH);
      postOutput = makePostRequest(url, params);
    } catch (IOException e) {
      AuthenticationException ae =
        new AuthenticationException("Error connecting with login URI");
      ae.initCause(e);
      throw ae;
    }

    // Parse the output
    Map<String, String> tokenPairs =
View Full Code Here

Examples of com.google.gdata.util.AuthenticationException

      return new CaptchaRequiredException("Captcha required",
                                          captchaUrl.toString(),
                                          pairs.get("CaptchaToken"));

    } else {
      return new AuthenticationException("Error authenticating " +
                                         "(check service name)");
    }
  }
View Full Code Here

Examples of com.hazelcast.client.AuthenticationException

            if (iter.hasNext()) {
                final Data principalData = iter.next();
                return ss.toObject(principalData);
            }
        }
        throw new AuthenticationException();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.