use of com.networknt.oauth.security.LightBasicAuthenticationMechanism in project light-oauth2 by networknt.
the class PathHandlerProvider method addGetSecurity.
private HttpHandler addGetSecurity(final HttpHandler toWrap, final IdentityManager identityManager) {
HttpHandler handler = toWrap;
handler = new AuthenticationCallHandler(handler);
handler = new AuthenticationConstraintHandler(handler);
List<AuthenticationMechanism> mechanisms = new ArrayList<>();
// bypass the SPNEGO if service password is not even configured.
if (spnegoServicePassword != null) {
mechanisms.add(new LightGSSAPIAuthenticationMechanism(new SubjectFactory()));
}
mechanisms.add(new LightBasicAuthenticationMechanism("OAuth"));
handler = new AuthenticationMechanismsHandler(handler, mechanisms);
handler = new SecurityInitialHandler(AuthenticationMode.PRO_ACTIVE, identityManager, handler);
return handler;
}
use of com.networknt.oauth.security.LightBasicAuthenticationMechanism in project light-oauth2 by networknt.
the class BaseWrapper method addGetSecurity.
protected HttpHandler addGetSecurity(final HttpHandler toWrap, final IdentityManager identityManager) {
HttpHandler handler = toWrap;
handler = new AuthenticationCallHandler(handler);
handler = new AuthenticationConstraintHandler(handler);
List<AuthenticationMechanism> mechanisms = new ArrayList<>();
// bypass the SPNEGO if service password is not even configured.
if (spnegoServicePassword != null) {
mechanisms.add(new LightGSSAPIAuthenticationMechanism(new SubjectFactory()));
}
mechanisms.add(new LightBasicAuthenticationMechanism("OAuth"));
handler = new AuthenticationMechanismsHandler(handler, mechanisms);
handler = new SecurityInitialHandler(AuthenticationMode.PRO_ACTIVE, identityManager, handler);
return handler;
}
Aggregations