Committing logic that stores BST within request metadata

4.x.x
prabathabey 9 years ago
commit 2b0e1eecab

@ -27,6 +27,7 @@ import org.apache.axiom.soap.SOAPHeaderBlock;
import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response; import org.apache.catalina.connector.Response;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.coyote.InputBuffer; import org.apache.coyote.InputBuffer;
@ -130,7 +131,8 @@ public class BSTAuthenticator implements WebappAuthenticator {
authenticationInfo.setStatus(WebappAuthenticator.Status.CONTINUE); authenticationInfo.setStatus(WebappAuthenticator.Status.CONTINUE);
} else { } else {
String bearerToken = request.getAttribute("BST").toString(); String bearerToken = new String(
Base64.decodeBase64(request.getAttribute("BST").toString().getBytes()));
String resource = requestUri + ":" + requestMethod; String resource = requestUri + ":" + requestMethod;

Loading…
Cancel
Save