Examples of authenticate()


Examples of com.facebook.presto.jdbc.internal.jetty.client.api.Authentication.authenticate()

                LOG.debug("No authentication available for {}", request);
                forwardSuccessComplete(request, response);
                return;
            }

            final Authentication.Result authnResult = authentication.authenticate(request, response, headerInfo, conversation);
            LOG.debug("Authentication result {}", authnResult);
            if (authnResult == null)
            {
                forwardSuccessComplete(request, response);
                return;
View Full Code Here

Examples of com.feth.play.module.pa.providers.AuthProvider.authenticate()

      return Controller.notFound(Messages.get(
          "playauthenticate.core.exception.provider_not_found",
          provider));
    }
    try {
      final Object o = ap.authenticate(context, payload);
      if (o instanceof String) {
        return Controller.redirect((String) o);
      } else if (o instanceof Result) {
        return (Result) o;
      } else if (o instanceof AuthUser) {
View Full Code Here

Examples of com.gitblit.auth.RedmineAuthProvider.authenticate()

    @Test
    public void testAuthenticate() throws Exception {
      RedmineAuthProvider redmine = newRedmineAuthentication();
        redmine.setTestingCurrentUserAsJson(JSON);
        UserModel userModel = redmine.authenticate("RedmineAdminId", "RedmineAPIKey".toCharArray());
        assertThat(userModel.getName(), is("redmineadminid"));
        assertThat(userModel.getDisplayName(), is("baz foo"));
        assertThat(userModel.emailAddress, is("baz@example.com"));
        assertNotNull(userModel.cookie);
    }
View Full Code Here

Examples of com.gitblit.manager.AuthenticationManager.authenticate()

    }

    @Test
    public void testAuthenticationManager() throws Exception {
      AuthenticationManager auth = newAuthenticationManager();
        UserModel userModel = auth.authenticate("RedmineAdminId", "RedmineAPIKey".toCharArray());
        assertThat(userModel.getName(), is("redmineadminid"));
        assertThat(userModel.getDisplayName(), is("baz foo"));
        assertThat(userModel.emailAddress, is("baz@example.com"));
        assertNotNull(userModel.cookie);
    }
View Full Code Here

Examples of com.gitblit.manager.IAuthenticationManager.authenticate()

      UserModel user = new UserModel("sunnyjim");
    user.password = "password";
    users.updateUserModel(user);

    assertNotNull(auth.authenticate(user.username, user.password.toCharArray()));
    user.disabled = true;

    users.updateUserModel(user);
    assertNull(auth.authenticate(user.username, user.password.toCharArray()));
    users.deleteUserModel(user);
View Full Code Here

Examples of com.github.ebnew.ki4so.core.authentication.AuthenticationManager.authenticate()

    InvalidCredentialException exception = Mockito.mock(InvalidCredentialException.class);
    String code = "message code";
    String msgKey ="message key";
    Mockito.when(exception.getCode()).thenReturn(code);
    Mockito.when(exception.getMsgKey()).thenReturn(msgKey);
    Mockito.when(authenticationManager.authenticate(credential)).thenThrow(exception);
    LoginResult loginResult = ki4soService.login(credential);
    LoginResult expected = new LoginResult();
    expected.setSuccess(false);
    expected.setCode(code);
    expected.setMsgKey(msgKey);
View Full Code Here

Examples of com.github.ebnew.ki4so.core.authentication.handlers.AuthenticationHandler.authenticate()

   
   
    //测试情况5,测试存在合法的认证处理器的情况,但是无合法的凭据转换器。
    handler = Mockito.mock(AuthenticationHandler.class);
    Mockito.when(handler.supports(credential)).thenReturn(true);
    Mockito.when(handler.authenticate(credential)).thenReturn(true);
    try{
      authenticationHandlers = new ArrayList<AuthenticationHandler>();
      authenticationHandlers.add(handler);
      authenticationManager.setAuthenticationHandlers(authenticationHandlers);
      authenticationManager.authenticate(credential);
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_19.LoginRemote.authenticate()

    // Request the login service from the service client factory.
    LoginRemote loginService = dfaServices.get(session, LoginRemote.class);

    // Authenticate.
    UserProfile userProfile = loginService.authenticate(username, password);

    // Display user profile token, DFA account name and ID.
    System.out.printf("User profile token is \"%s\", DFA account name is \"%s\", and DFA " +
        "account ID is \"%s\".%n", userProfile.getToken(), userProfile.getNetworkName(),
        userProfile.getNetworkId());
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.LoginRemote.authenticate()

    // Request the login service from the service client factory.
    LoginRemote loginService = dfaServices.get(session, LoginRemote.class);

    // Authenticate.
    UserProfile userProfile = loginService.authenticate(username, password);

    // Display user profile token, DFA account name and ID.
    System.out.printf("User profile token is \"%s\", DFA account name is \"%s\", and DFA " +
        "account ID is \"%s\".%n", userProfile.getToken(), userProfile.getNetworkName(),
        userProfile.getNetworkId());
View Full Code Here

Examples of com.google.api.client.googleapis.auth.clientlogin.ClientLogin.authenticate()

  private static void authenticateWithClientLogin(HttpTransport transport) throws IOException {
    ClientLogin authenticator = new ClientLogin();
    authenticator.authTokenType = "xapi";
    authenticator.username = ClientLoginCredentials.ENTER_USERNAME;
    authenticator.password = ClientLoginCredentials.ENTER_PASSWORD;
    authenticator.authenticate().setAuthorizationHeader(transport);
  }

  /* Makes a prediction call to the Google Prediction API */
  private static float predict(HttpTransport transport, float[] signals) throws IOException {
    HttpRequest request = transport.buildPostRequest();
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.