Committing logic that stores BST within request metadata

This commit is contained in:
prabathabey 2015-12-21 22:50:30 +05:30
commit 2b0e1eecab

View File

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