Examples of authenticate()


Examples of org.mule.api.security.SecurityProvider.authenticate()

                }

                Authentication result = null;
                try
                {
                    result = provider.authenticate(authentication);
                }
                catch (Exception e)
                {
                    if (!iter.hasNext())
                    {
View Full Code Here

Examples of org.netbeans.server.uihandler.api.Authenticator.authenticate()

            passwd = params[PASSWD_IDX];
        }
        Authenticator auth = Authenticate.getAuthenticator();
        Authenticator.AuthToken userToken = null;
        if (auth != null) {
            userToken = auth.authenticate(userName, passwd);
            if (userToken == null) {
                params[USER_NAME_IDX] = BugReporter.GUEST_USER;
                params[PASSWD_IDX] = null;
            }
        }
View Full Code Here

Examples of org.netbeans.server.uihandler.bugs.AuthenticatorImpl.authenticate()

    @Test
    public void testAuthenticate() {
        AuthenticatorImpl.AUTHENTICATE_URL = "https://testnetbeans.org/api/login/authenticate.json";
        AuthenticatorImpl impl = new AuthenticatorImpl();
        Authenticator.AuthToken token = impl.authenticate("jindrich.sedek@sun.com", "vsdsvsds");
        assertNotNull(token);
        assertEquals("exceptions_reporter", token.getUserName());

        token = impl.authenticate("petr.blaha@sun.com", "vsdsvsds");
        assertNotNull(token);
View Full Code Here

Examples of org.openengsb.domain.authentication.AuthenticationDomain.authenticate()

        assertThat(realResultArg, equalTo((Object) new TestClass("test")));
    }

    private FilterChain createSecureFilterChain() throws Exception {
        AuthenticationDomain authenticationManager = mock(AuthenticationDomain.class);
        when(authenticationManager.authenticate(anyString(), any(Credentials.class))).thenAnswer(
            new Answer<Authentication>() {
                @Override
                public Authentication answer(InvocationOnMock invocation) throws Throwable {
                    String user = (String) invocation.getArguments()[0];
                    Password credentials = (Password) invocation.getArguments()[1];
View Full Code Here

Examples of org.openid4java.consumer.ConsumerManager.authenticate()

    public void beginConsumptionCreatesExpectedSessionData() throws Exception {
        ConsumerManager mgr = mock(ConsumerManager.class);
        AuthRequest authReq = mock(AuthRequest.class);
        DiscoveryInformation di = mock(DiscoveryInformation.class);

        when(mgr.authenticate(any(DiscoveryInformation.class), anyString(), anyString())).thenReturn(authReq);
        when(mgr.associate(anyList())).thenReturn(di);

        OpenID4JavaConsumer consumer = new OpenID4JavaConsumer(mgr, attributes);

        MockHttpServletRequest request = new MockHttpServletRequest();
View Full Code Here

Examples of org.openqa.jetty.http.UserRealm.authenticate()

            if (_requireName==null)
                return true;

            // Authenticate with realm
            UserRealm realm=context.getRealm();
            Principal principal=realm==null?null:realm.authenticate(user,pass,request);
            if (principal==null)
            {
                // Have to authenticate the user with the password file
                String code=getUserCode(user);
                String salt=code!=null?code.substring(0,2):user;
View Full Code Here

Examples of org.openstack.client.common.OpenstackSession.authenticate()

  public OpenstackSession getOpenstackSession() {
    if (openstackSession == null) {
      OpenstackSession session = OpenstackSession.create();

      session.authenticate(credentials, false);

      openstackSession = session;

      ensureContainer();
    }
View Full Code Here

Examples of org.openstack.keystone.auth.client.KeystoneAuthenticationClient.authenticate()

        PasswordCredentials passwordCredentials = new PasswordCredentials();
        passwordCredentials.setUsername("user1");
        passwordCredentials.setPassword("secretuser1");

        String tenantId = null;
        client.authenticate(tenantId, passwordCredentials);
    }

    @Test(expected = KeystoneAuthenticationException.class)
    public void listTenants_forgedToken() throws Exception {
        KeystoneAuthenticationClient client = new KeystoneAuthenticationClient();
View Full Code Here

Examples of org.picketlink.identity.federation.bindings.tomcat.sp.SPPostFormAuthenticator.authenticate()

        MockCatalinaResponse catalinaResponse = new MockCatalinaResponse();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        catalinaResponse.setWriter(new PrintWriter(baos));

        LoginConfig loginConfig = new LoginConfig();
        assertTrue(spEmpl.authenticate(catalinaRequest, catalinaResponse, loginConfig));

        Map<String, List<Object>> sessionMap = (Map<String, List<Object>>) session
                .getAttribute(GeneralConstants.SESSION_ATTRIBUTE_MAP);
        assertNotNull(sessionMap);
        assertEquals("asptest_email", sessionMap.get("email").get(0));
View Full Code Here

Examples of org.picketlink.identity.federation.bindings.tomcat.sp.SPRedirectFormAuthenticator.authenticate()

        MockCatalinaSession session = new MockCatalinaSession();

        sp.setContainer(context);
        sp.testStart();

        sp.authenticate(request, response, loginConfig);

        String redirectStr = response.redirectString;
        assertNotNull("Redirect String is null?", redirectStr);
        String saml = redirectStr.substring(redirectStr.indexOf(SAML_REQUEST_KEY) + SAML_REQUEST_KEY.length());
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.