mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
commit
773d78df3f
@ -47,7 +47,7 @@ public class OauthAuthenticator implements CarbonServerAuthenticator {
|
|||||||
try {
|
try {
|
||||||
tokenValidator = OAuthValidatorFactory.getValidator();
|
tokenValidator = OAuthValidatorFactory.getValidator();
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
log.error("Failed to initialise Authenticator",e);
|
log.error("Failed to initialise Authenticator", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ public class OauthAuthenticator implements CarbonServerAuthenticator {
|
|||||||
*/
|
*/
|
||||||
public boolean isHandle(MessageContext messageContext) {
|
public boolean isHandle(MessageContext messageContext) {
|
||||||
HttpServletRequest httpServletRequest = getHttpRequest(messageContext);
|
HttpServletRequest httpServletRequest = getHttpRequest(messageContext);
|
||||||
if(httpServletRequest != null) {
|
if (httpServletRequest != null) {
|
||||||
String headerValue = httpServletRequest.getHeader(HTTPConstants.HEADER_AUTHORIZATION);
|
String headerValue = httpServletRequest.getHeader(HTTPConstants.HEADER_AUTHORIZATION);
|
||||||
if (headerValue != null && !headerValue.trim().isEmpty()) {
|
if (headerValue != null && !headerValue.trim().isEmpty()) {
|
||||||
String[] headerPart = headerValue.trim().split(OauthAuthenticatorConstants.SPLITING_CHARACTOR);
|
String[] headerPart = headerValue.trim().split(OauthAuthenticatorConstants.SPLITING_CHARACTOR);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user