Package javax.security.auth.login

Examples of javax.security.auth.login.Configuration


      throws MBeanException, ReflectionException
   {
      Object value = null;
      if( method.equals("getConfiguration") )
      {
         Configuration currentConfig = (Configuration) args[0];
         value = this.getConfiguration(currentConfig);
      }
      return value;
   }
View Full Code Here


@Ignore //ignore for the moment because "mvn test" runs into PermGen memory issues
public class LdapLoginWithRepoLoginTest extends LdapLoginTestBase {

    @Override
    protected Configuration getConfiguration() {
        return new Configuration() {
            @Override
            public AppConfigurationEntry[] getAppConfigurationEntry(String s) {
                return new AppConfigurationEntry[]{
                        new AppConfigurationEntry(
                                LoginModuleImpl.class.getName(),
View Full Code Here

@Ignore //ignore for the moment because "mvn test" runs into PermGen memory issues
public class LdapLoginStandaloneTest extends LdapLoginTestBase {

    @Override
    protected Configuration getConfiguration() {
        return new Configuration() {
            @Override
            public AppConfigurationEntry[] getAppConfigurationEntry(String s) {
                return new AppConfigurationEntry[]{
                        new AppConfigurationEntry(
                                ExternalLoginModule.class.getName(),
View Full Code Here

     */
    @Nonnull
    @Override
    public LoginContextProvider getLoginContextProvider(ContentRepository contentRepository) {
        String appName = getParameters().getConfigValue(PARAM_APP_NAME, DEFAULT_APP_NAME);
        Configuration loginConfig = null;
        try {
            loginConfig = Configuration.getConfiguration();
            // NOTE: workaround for Java7 behavior (see OAK-497)
            if (loginConfig.getAppConfigurationEntry(appName) == null) {
                loginConfig = null;
            }
        } catch (SecurityException e) {
            log.info("Failed to retrieve login configuration: using default. " + e);
        }
View Full Code Here

            syncHandlerReg = whiteboard.register(SyncHandler.class, new DefaultSyncHandler(cfg), Collections.<String, Object>emptyMap());
        }
    }

    protected Configuration getConfiguration() {
        return new Configuration() {
            @Override
            public AppConfigurationEntry[] getAppConfigurationEntry(String s) {
                AppConfigurationEntry entry = new AppConfigurationEntry(
                        ExternalLoginModule.class.getName(),
                        AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
View Full Code Here

      throws MBeanException, ReflectionException
   {
      Object value = null;
      if( method.equals("getConfiguration") )
      {
         Configuration currentConfig = (Configuration) args[0];
         value = this.getConfiguration(currentConfig);
      }
      return value;
   }
View Full Code Here

    */
   public synchronized void pushLoginConfig(String objectName)
      throws JMException, MalformedObjectNameException
   {
      ObjectName name = new ObjectName(objectName);
      Configuration prevConfig = null;
      if( loginConfigStack.empty() == false )
      {
         ConfigInfo prevInfo = (ConfigInfo) loginConfigStack.peek();
         prevConfig = prevInfo.config;
      }
View Full Code Here

    */
   public synchronized void popLoginConfig()
      throws JMException
   {
      ConfigInfo info = (ConfigInfo) loginConfigStack.pop();
      Configuration prevConfig = null;
      if( loginConfigStack.empty() == false )
      {
         ConfigInfo prevInfo = (ConfigInfo) loginConfigStack.peek();
         prevConfig = prevInfo.config;
      }
View Full Code Here

      throws JMException
   {
      MBeanServer server = super.getServer();
      Object[] args = {prevConfig};
      String[] signature = {"javax.security.auth.login.Configuration"};
      Configuration config = (Configuration) server.invoke(name,
         "getConfiguration", args, signature);
      Configuration.setConfiguration(config);
      ConfigInfo info = new ConfigInfo(name, config);
      log.debug("Installed JAAS Configuration service="+name+", config="+config);
      return info;
View Full Code Here

    private LoginContext loginContext;

    public JaasAuthenticationInvocationHandler(Object target, String username, String password) {
        this.target = target;               
        JBossCallbackHandler jaasCallbackHandler = new JBossCallbackHandler(username, password);
        Configuration jaasConfig = new JBossConfiguration();
        try {
            this.loginContext = new LoginContext(JBossConfiguration.JBOSS_ENTRY_NAME, null, jaasCallbackHandler,
                    jaasConfig);
        }
        catch (LoginException e) {
View Full Code Here

TOP

Related Classes of javax.security.auth.login.Configuration

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.