Examples of KerberosServiceRequestToken


Examples of org.springframework.security.extensions.kerberos.KerberosServiceRequestToken

            if (logger.isDebugEnabled()) {
                logger.debug("Received Negotiate Header for request " + request.getRequestURL() + ": " + header);
            }
            byte[] base64Token = header.substring(10).getBytes("UTF-8");
            byte[] kerberosTicket = Base64.decode(base64Token);
            KerberosServiceRequestToken authenticationRequest = new KerberosServiceRequestToken(kerberosTicket);
            authenticationRequest.setDetails(authenticationDetailsSource.buildDetails(request));
            Authentication authentication;
            try {
                authentication = authenticationManager.authenticate(authenticationRequest);
            } catch (AuthenticationException e) {
                // That shouldn't happen, as it is most likely a wrong
View Full Code Here

Examples of org.springframework.security.extensions.kerberos.KerberosServiceRequestToken

    }

    private void everythingWorks() throws IOException, ServletException {
        // stubbing
        when(request.getHeader(HEADER)).thenReturn(TOKEN_PREFIX + TEST_TOKEN_BASE64);
        KerberosServiceRequestToken requestToken = new KerberosServiceRequestToken(TEST_TOKEN);
        requestToken.setDetails(detailsSource.buildDetails(request));
        when(authenticationManager.authenticate(requestToken)).thenReturn(AUTHENTICATION);

        // testing
        filter.doFilter(request, response, chain);
        verify(chain).doFilter(request, response);
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.