/** * Get a new authentication context which is the same as this one, but which includes the given rule and SSL context at * the end of its SSL context list. * * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context */ public AuthenticationContext withSsl(MatchRule rule, SecurityFactory<SSLContext> sslContext) { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, with(sslRules, rule, sslContext)); }
AuthenticationContext context = AuthenticationContext.empty().with(MatchRule.ALL, mergedConfiguration); final SSLContext sslContext = tempContext; context = sslContext != null ? context.withSsl(MatchRule.ALL, () -> sslContext) : context;
/** * Get a new authentication context which is the same as this one, but which includes the given rule and configuration at * the end of its list. * * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context */ public AuthenticationContext with(MatchRule rule, AuthenticationConfiguration configuration) { if (configuration == null || rule == null) return this; return new AuthenticationContext(with(authRules, rule, configuration), sslRules); }
public AuthenticationContext get() { return inherit ? context.with(AuthenticationContext.captureCurrent()) : context; } }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and configuration * inserted at the position of its list indicated by the {@code idx} parameter. * * @param idx the index at which insertion should be done * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext with(int idx, MatchRule rule, AuthenticationConfiguration configuration) throws IndexOutOfBoundsException { if (configuration == null || rule == null) return this; return new AuthenticationContext(with(authRules, rule, configuration, idx), sslRules); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and SSL context * inserted at the position of its list indicated by the {@code idx} parameter. * * @param idx the index at which insertion should be done * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext withSsl(int idx, MatchRule rule, SecurityFactory<SSLContext> sslContext) throws IndexOutOfBoundsException { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, with(sslRules, rule, sslContext, idx)); }
RemotingOptions.mergeOptionsIntoAuthenticationConfiguration(clusterConnectionOptionMap, defaultAuthenticationConfiguration); clustersAuthenticationContext = clustersAuthenticationContext.with(defaultRule, defaultAuthenticationConfiguration); RemotingOptions.mergeOptionsIntoAuthenticationConfiguration(connectionOptionMap, nodeAuthenticationConfiguration); clustersAuthenticationContext = clustersAuthenticationContext.with(0, nodeRule, nodeAuthenticationConfiguration);
this.prepareInterceptorContext(op, params, interceptorContext); try { final AuthenticationContext context = AuthenticationContext.captureCurrent().with(MatchRule.ALL.matchProtocol("iiop"), authenticationConfiguration); retVal = identity.runAs((PrivilegedExceptionAction<Object>) () -> context.run((PrivilegedExceptionAction<Object>) () -> this.componentView.invoke(interceptorContext))); } catch (PrivilegedActionException e) {
transformed = ejbClientClustersAuthenticationContext.with(transformed);
authContext = AuthenticationContext.captureCurrent(); } else { authContext = AuthenticationContext.empty().with(MatchRule.ALL, AuthenticationConfiguration.empty().useForwardedIdentity(domain));
/** * Get a new authentication context which is the same as this one, but which includes the given rule and configuration at * the end of its list. * * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context */ public AuthenticationContext with(MatchRule rule, AuthenticationConfiguration configuration) { if (configuration == null || rule == null) return this; return new AuthenticationContext(with(authRules, rule, configuration), sslRules); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and SSL context at * the end of its SSL context list. * * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context */ public AuthenticationContext withSsl(MatchRule rule, SecurityFactory<SSLContext> sslContext) { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, with(sslRules, rule, sslContext)); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and configuration at * the end of its list. * * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context */ public AuthenticationContext with(MatchRule rule, AuthenticationConfiguration configuration) { if (configuration == null || rule == null) return this; return new AuthenticationContext(with(authRules, rule, configuration), sslRules); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and SSL context at * the end of its SSL context list. * * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context */ public AuthenticationContext withSsl(MatchRule rule, SecurityFactory<SSLContext> sslContext) { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, with(sslRules, rule, sslContext)); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and SSL context at * the end of its SSL context list. * * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context */ public AuthenticationContext withSsl(MatchRule rule, SecurityFactory<SSLContext> sslContext) { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, with(sslRules, rule, sslContext)); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and configuration at * the end of its list. * * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context */ public AuthenticationContext with(MatchRule rule, AuthenticationConfiguration configuration) { if (configuration == null || rule == null) return this; return new AuthenticationContext(with(authRules, rule, configuration), sslRules); }
public AuthenticationContext get() { return inherit ? context.with(AuthenticationContext.captureCurrent()) : context; } }