com.atlassian.crowd.acceptance.tests.rest
Class BasicAuthFilter

java.lang.Object
  extended by com.sun.jersey.api.client.filter.ClientFilter
      extended by com.atlassian.crowd.acceptance.tests.rest.BasicAuthFilter
All Implemented Interfaces:
com.sun.jersey.api.client.ClientHandler

public class BasicAuthFilter
extends com.sun.jersey.api.client.filter.ClientFilter

This exists because the HTTPBasicAuthFilter shipped with Jersey 1.0.3 adds "" padding before encoding, which confuses the Spring Basic Auth filter.


Constructor Summary
BasicAuthFilter(String username, String password)
          Creates a new HTTP Basic Authentication filter with the provided username and password.
 
Method Summary
 com.sun.jersey.api.client.ClientResponse handle(com.sun.jersey.api.client.ClientRequest cr)
           
 
Methods inherited from class com.sun.jersey.api.client.filter.ClientFilter
getNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAuthFilter

public BasicAuthFilter(String username,
                       String password)
Creates a new HTTP Basic Authentication filter with the provided username and password.

Parameters:
username - name of the user
password - password
Method Detail

handle

public com.sun.jersey.api.client.ClientResponse handle(com.sun.jersey.api.client.ClientRequest cr)
                                                throws com.sun.jersey.api.client.ClientHandlerException
Specified by:
handle in interface com.sun.jersey.api.client.ClientHandler
Specified by:
handle in class com.sun.jersey.api.client.filter.ClientFilter
Throws:
com.sun.jersey.api.client.ClientHandlerException


Copyright © 2012 Atlassian. All Rights Reserved.