/** * @see javax.security.auth.message.config.AuthConfigProvider#getServerAuthConfig(java.lang.String, java.lang.String, * javax.security.auth.callback.CallbackHandler) */ @Override public ServerAuthConfig getServerAuthConfig(String layer, String appContext, CallbackHandler callbackHandler) throws AuthException, SecurityException { // The layer and appContext values are required to match the values used to obtain this provider, however unless we // create a new instance each time we can not really enforce that - but it does mean as per JSR-196 2.1.1.1 these must // not be null. checkNotNullParam("layer", layer); checkNotNullParam("appContext", appContext); // We can however double check the values match the configuration this provider should be used for. if ( !serverAuthModuleDefinitions.isEmpty() && (messageLayer == null || messageLayer.equals(layer)) && (applicationContext == null || applicationContext.equals(appContext))) { return new ElytronServerAuthConfig(this.messageLayer, this.applicationContext, callbackHandler, serverAuthModuleDefinitions); } return EMPTY_SERVER_AUTH_CONFIG; }
/** * @see javax.security.auth.message.config.AuthConfigProvider#getServerAuthConfig(java.lang.String, java.lang.String, * javax.security.auth.callback.CallbackHandler) */ @Override public ServerAuthConfig getServerAuthConfig(String layer, String appContext, CallbackHandler callbackHandler) throws AuthException, SecurityException { // The layer and appContext values are required to match the values used to obtain this provider, however unless we // create a new instance each time we can not really enforce that - but it does mean as per JSR-196 2.1.1.1 these must // not be null. checkNotNullParam("layer", layer); checkNotNullParam("appContext", appContext); // We can however double check the values match the configuration this provider should be used for. if ( !serverAuthModuleDefinitions.isEmpty() && (messageLayer == null || messageLayer.equals(layer)) && (applicationContext == null || applicationContext.equals(appContext))) { return new ElytronServerAuthConfig(this.messageLayer, this.applicationContext, callbackHandler, serverAuthModuleDefinitions); } return EMPTY_SERVER_AUTH_CONFIG; }
/** * @see javax.security.auth.message.config.AuthConfigProvider#getServerAuthConfig(java.lang.String, java.lang.String, * javax.security.auth.callback.CallbackHandler) */ @Override public ServerAuthConfig getServerAuthConfig(String layer, String appContext, CallbackHandler callbackHandler) throws AuthException, SecurityException { // The layer and appContext values are required to match the values used to obtain this provider, however unless we // create a new instance each time we can not really enforce that - but it does mean as per JSR-196 2.1.1.1 these must // not be null. checkNotNullParam("layer", layer); checkNotNullParam("appContext", appContext); // We can however double check the values match the configuration this provider should be used for. if ( !serverAuthModuleDefinitions.isEmpty() && (messageLayer == null || messageLayer.equals(layer)) && (applicationContext == null || applicationContext.equals(appContext))) { return new ElytronServerAuthConfig(this.messageLayer, this.applicationContext, callbackHandler, serverAuthModuleDefinitions); } return EMPTY_SERVER_AUTH_CONFIG; }