Java Reference
In-Depth Information
handler.handle(new Callback[]{
new
CallerPrincipalCallback(clientSubject,
username)});
if (username != null) {
messageInfo.getMap().put("javax.servlet.http.authType",
"ServerAuthModuleImpl");
}
return AuthStatus.SUCCESS;
} catch (Exception e) {
e.printStackTrace();
throw new
AuthException(e.getMessage());
}
}
public String validation(MessageInfo mInfo,
Subject cSubject) throws Exception {
HttpServletRequest request =
(HttpServletRequest) mInfo.getRequestMessage();
String headerAutho =
request.getHeader("authorization");
if (headerAutho != null &&
headerAutho.startsWith("Basic")) {
headerAutho =
headerAutho.substring(6).trim();
String decodedAutho = new
String(Base64.decode(headerAutho.getBytes()));
int colon =
decodedAutho.indexOf(':');
if (colon <= 0 || colon ==
Search WWH ::




Custom Search