String realmName = config.getRealmName(); if (realmName == null) realmName = REALM_NAME;
String realmName = config.getRealmName(); if (realmName == null) realmName = REALM_NAME;
String realmName = config.getRealmName(); if (realmName == null) realmName = REALM_NAME;
protected void basicAuthError(Response response) throws IOException { response.setHeader(HttpHeaders.WWW_AUTHENTICATE, "Basic realm=\"" + context.getLoginConfig().getRealmName() + "\""); response.sendError(401); }
} catch (final GatewayException e) { final String realmName = config.getRealmName() == null ? REALM_NAME : config.getRealmName(); Respond.withError(request, response, realmName, e); return false;
String realmName = config.getRealmName(); if (realmName == null) realmName = REALM_NAME;
String realmName = config.getRealmName(); if (realmName == null) realmName = REALM_NAME;
String realmName = config.getRealmName(); if (realmName == null) realmName = REALM_NAME;
String realmName = config.getRealmName(); if (realmName == null) realmName = request.getServerName() + ":"
String realmName = config.getRealmName(); if (realmName == null) realmName = REALM_NAME;
String lcRealm = config.getRealmName(); if (lcRealm == null) { lcRealm = REALM_NAME;
final String realmName = config.getRealmName() == null ? REALM_NAME : config.getRealmName();
String realmName = config.getRealmName(); if (realmName == null) realmName = request.getServerName() + ":"
String realmName = config.getRealmName(); if (realmName == null) realmName = REALM_NAME;
@Deprecated private static WebConstraint findLegacyConstraints(final Context context, final String[] roles, final String transportGuarantee) { final LoginConfig loginConfig = context.getLoginConfig(); if (loginConfig != null || roles != null || transportGuarantee != null) { final WebConstraint constraint = new WebConstraint() .withAuthMethod(loginConfig != null && !"NONE".equalsIgnoreCase(loginConfig.getAuthMethod()) ? loginConfig.getAuthMethod() : null) .withTransportGuarantee(transportGuarantee) .withRealm(loginConfig != null ? loginConfig.getRealmName() : null) .withRole(roles); for (final Valve valve : context.getPipeline().getValves()) { if (SignatureAuthenticator.class.isInstance(valve) && "SIGNATURE".equals(constraint.getAuthMethod())) { constraint.withMandatoryHeader(SignatureAuthenticator.class.cast(valve).getHeaders().split(" ")); } else if (info(valve).startsWith("com.tomitribe.tribestream.proxy.auth.TokenValve/")) { constraint.withMandatoryHeader(SystemInstance.get().getProperty("tribe.oauth2.auth.header", "Authorization")); if (constraint.getAuthMethod() == null) { constraint.withAuthMethod("JWT"); // virtual auth method but useful information } else { constraint.withAuthMethod(constraint.getAuthMethod() + "+JWT"); } } } return constraint; } return null; }
if (config.getRealmName() == null) { value.append(REALM_NAME); } else { value.append(config.getRealmName());
if (config.getRealmName() == null) { value.append(REALM_NAME); } else { value.append(config.getRealmName());
@Override protected void authenticatorConfig() { if (!(context instanceof GeronimoStandardContext)) { throw new IllegalStateException("Unexpected context type"); } GeronimoStandardContext geronimoContext = (GeronimoStandardContext) context; if (geronimoContext.isAuthenticatorInstalled()) { return; } if (geronimoContext.getDefaultSubject() == null) { return; } LoginConfig loginConfig = context.getLoginConfig(); if (loginConfig == null) { loginConfig = new LoginConfig(); } String authMethod = loginConfig.getAuthMethod(); String realmName = loginConfig.getRealmName(); String loginPage = loginConfig.getLoginPage(); String errorPage = loginConfig.getErrorPage(); configureSecurity(geronimoContext, geronimoContext.getPolicyContextId(), geronimoContext.getConfigurationFactory(), geronimoContext.getDefaultSubject(), authMethod, realmName, loginPage, errorPage); }
CharChunk authenticateCC = authenticate.getCharChunk(); authenticateCC.append("Basic realm=\""); if (config.getRealmName() == null) { authenticateCC.append(request.getServerName()); authenticateCC.append(':'); authenticateCC.append(Integer.toString(request.getServerPort())); } else { authenticateCC.append(config.getRealmName());
if (config.getRealmName() == null) { authenticateCC.append(request.getServerName()); authenticateCC.append(':'); authenticateCC.append(Integer.toString(request.getServerPort())); } else { authenticateCC.append(config.getRealmName());