Package org.glassfish.security.services.config

Examples of org.glassfish.security.services.config.LoginModuleConfig


    private void updateSecurityProvider(final Transaction t, final SecurityProvider w_sp,
            final StringBuilder sb) throws TransactionFailure, PropertyVetoException {
        for (SecurityProviderConfig spc : w_sp.getSecurityProviderConfig()) {
            if ((spc instanceof LoginModuleConfig) && spc.getName().equals(ADMIN_FILE_LM_NAME)) {
                final LoginModuleConfig w_lmConfig = t.enroll((LoginModuleConfig) spc);
                w_lmConfig.setModuleClass(LDAPLoginModule.class.getName());
                sb.append(lsm.getString("ldap.authProviderConfigOK", w_sp.getName()));
                return;
            }
        }
        throw new TransactionFailure(
View Full Code Here


  public void execute(AdminCommandContext context) {
        final ActionReport report = context.getActionReport();

        // Add LoginModule configuration to the security provider setup
        // TODO - Add validation logic of the LoginModule config attributes
        LoginModuleConfig config = null;
        try {
            config = (LoginModuleConfig) ConfigSupport.apply(new SingleConfigCode<SecurityProvider>() {
                @Override
                public Object run(SecurityProvider param) throws PropertyVetoException, TransactionFailure {
                  LoginModuleConfig lmConfig = param.createChild(LoginModuleConfig.class);
                  lmConfig.setName(name);
                  lmConfig.setModuleClass(moduleClass);
                  lmConfig.setControlFlag(controlFlag);
                    // TODO - Should prevent multiple security provider config entries
                  param.getSecurityProviderConfig().add(lmConfig);
                    return lmConfig;
                }
            }, provider);
View Full Code Here

            if ("LoginModule".equalsIgnoreCase(provider.getType())) {
              List<SecurityProviderConfig> providerConfig = provider.getSecurityProviderConfig();
              if ((providerConfig != null) && (!providerConfig.isEmpty())) {

                // Create the JAAS AppConfigurationEntry from the LoginModule settings
                LoginModuleConfig lmConfig = (LoginModuleConfig) providerConfig.get(0);
                Map<String, ?> lmOptions = lmConfig.getModuleOptions();
                lmEntries.add(new AppConfigurationEntry(lmConfig.getModuleClass(),
                    getLoginModuleControlFlag(lmConfig.getControlFlag()),lmOptions));

                // Obtain the Realm name for password credential from the LoginModule options
                // Use the first LoginModule with auth-realm (i.e. unable to stack Realms)
                if (usePasswordCredential && (realmName == null)) {
                  String authRealm = (String) lmOptions.get("auth-realm");
View Full Code Here

  public void execute(AdminCommandContext context) {
        final ActionReport report = context.getActionReport();

        // Add LoginModule configuration to the security provider setup
        // TODO - Add validation logic of the LoginModule config attributes
        LoginModuleConfig config = null;
        try {
            config = (LoginModuleConfig) ConfigSupport.apply(new SingleConfigCode<SecurityProvider>() {
                @Override
                public Object run(SecurityProvider param) throws PropertyVetoException, TransactionFailure {
                  LoginModuleConfig lmConfig = param.createChild(LoginModuleConfig.class);
                  lmConfig.setName(name);
                  lmConfig.setModuleClass(moduleClass);
                  lmConfig.setControlFlag(controlFlag);
                    // TODO - Should prevent multiple security provider config entries
                  param.getSecurityProviderConfig().add(lmConfig);
                    return lmConfig;
                }
            }, provider);
View Full Code Here

            if ("LoginModule".equalsIgnoreCase(provider.getType())) {
              List<SecurityProviderConfig> providerConfig = provider.getSecurityProviderConfig();
              if ((providerConfig != null) && (!providerConfig.isEmpty())) {

                // Create the JAAS AppConfigurationEntry from the LoginModule settings
                LoginModuleConfig lmConfig = (LoginModuleConfig) providerConfig.get(0);
                Map<String, ?> lmOptions = lmConfig.getModuleOptions();
                lmEntries.add(new AppConfigurationEntry(lmConfig.getModuleClass(),
                    getLoginModuleControlFlag(lmConfig.getControlFlag()),lmOptions));

                // Obtain the Realm name for password credential from the LoginModule options
                // Use the first LoginModule with auth-realm (i.e. unable to stack Realms)
                if (usePasswordCredential && (realmName == null)) {
                  String authRealm = (String) lmOptions.get("auth-realm");
View Full Code Here

    private void updateSecurityProvider(final Transaction t, final SecurityProvider w_sp,
            final StringBuilder sb) throws TransactionFailure, PropertyVetoException {
        for (SecurityProviderConfig spc : w_sp.getSecurityProviderConfig()) {
            if ((spc instanceof LoginModuleConfig) && spc.getName().equals(ADMIN_FILE_LM_NAME)) {
                final LoginModuleConfig w_lmConfig = t.enroll((LoginModuleConfig) spc);
                w_lmConfig.setModuleClass(LDAPLoginModule.class.getName());
                sb.append(lsm.getString("ldap.authProviderConfigOK", w_sp.getName()));
                return;
            }
        }
        throw new TransactionFailure(
View Full Code Here

            if ("LoginModule".equalsIgnoreCase(provider.getType())) {
              List<SecurityProviderConfig> providerConfig = provider.getSecurityProviderConfig();
              if ((providerConfig != null) && (!providerConfig.isEmpty())) {

                // Create the JAAS AppConfigurationEntry from the LoginModule settings
                LoginModuleConfig lmConfig = (LoginModuleConfig) providerConfig.get(0);
                Map<String, ?> lmOptions = lmConfig.getModuleOptions();
                lmEntries.add(new AppConfigurationEntry(lmConfig.getModuleClass(),
                    getLoginModuleControlFlag(lmConfig.getControlFlag()),lmOptions));

                // Obtain the Realm name for password credential from the LoginModule options
                // Use the first LoginModule with auth-realm (i.e. unable to stack Realms)
                if (usePasswordCredential && (realmName == null)) {
                  String authRealm = (String) lmOptions.get("auth-realm");
View Full Code Here

    private void updateSecurityProvider(final Transaction t, final SecurityProvider w_sp,
            final StringBuilder sb) throws TransactionFailure, PropertyVetoException {
        for (SecurityProviderConfig spc : w_sp.getSecurityProviderConfig()) {
            if ((spc instanceof LoginModuleConfig) && spc.getName().equals(ADMIN_FILE_LM_NAME)) {
                final LoginModuleConfig w_lmConfig = t.enroll((LoginModuleConfig) spc);
                w_lmConfig.setModuleClass(LDAPLoginModule.class.getName());
                sb.append(lsm.getString("ldap.authProviderConfigOK", w_sp.getName()));
                return;
            }
        }
        throw new TransactionFailure(
View Full Code Here

            if ("LoginModule".equalsIgnoreCase(provider.getType())) {
              List<SecurityProviderConfig> providerConfig = provider.getSecurityProviderConfig();
              if ((providerConfig != null) && (!providerConfig.isEmpty())) {

                // Create the JAAS AppConfigurationEntry from the LoginModule settings
                LoginModuleConfig lmConfig = (LoginModuleConfig) providerConfig.get(0);
                Map<String, ?> lmOptions = lmConfig.getModuleOptions();
                lmEntries.add(new AppConfigurationEntry(lmConfig.getModuleClass(),
                    getLoginModuleControlFlag(lmConfig.getControlFlag()),lmOptions));

                // Obtain the Realm name for password credential from the LoginModule options
                // Use the first LoginModule with auth-realm (i.e. unable to stack Realms)
                if (usePasswordCredential && (realmName == null)) {
                  String authRealm = (String) lmOptions.get("auth-realm");
View Full Code Here

TOP

Related Classes of org.glassfish.security.services.config.LoginModuleConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.