Codota Logo
DefaultJaasAuthenticationProvider.setAuthorityGranters
Code IndexAdd Codota to your IDE (free)

How to use
setAuthorityGranters
method
in
org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider

Best Java code snippets using org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider.setAuthorityGranters (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-security

@Test(expected = IllegalArgumentException.class)
public void afterPropertiesSetNullAuthorityGranters() throws Exception {
  provider.setAuthorityGranters(null);
  provider.afterPropertiesSet();
}
origin: spring-projects/spring-security

@Before
public void setUp() throws Exception {
  Configuration configuration = mock(Configuration.class);
  publisher = mock(ApplicationEventPublisher.class);
  log = mock(Log.class);
  provider = new DefaultJaasAuthenticationProvider();
  provider.setConfiguration(configuration);
  provider.setApplicationEventPublisher(publisher);
  provider.setAuthorityGranters(new AuthorityGranter[] { new TestAuthorityGranter() });
  provider.afterPropertiesSet();
  AppConfigurationEntry[] aces = new AppConfigurationEntry[] { new AppConfigurationEntry(
      TestLoginModule.class.getName(), LoginModuleControlFlag.REQUIRED,
      Collections.<String, Object> emptyMap()) };
  when(configuration.getAppConfigurationEntry(provider.getLoginContextName()))
      .thenReturn(aces);
  token = new UsernamePasswordAuthenticationToken("user", "password");
  ReflectionTestUtils.setField(provider, "log", log);
}
origin: apache/atlas

  private void init() {
    try {
      AppConfigurationEntry appConfigurationEntry = new AppConfigurationEntry(
          loginModuleName, controlFlag, options);
      AppConfigurationEntry[] appConfigurationEntries = new AppConfigurationEntry[]{appConfigurationEntry};
      Map<String, AppConfigurationEntry[]> appConfigurationEntriesOptions =
          new HashMap<String, AppConfigurationEntry[]>();
      appConfigurationEntriesOptions.put("SPRINGSECURITY",
          appConfigurationEntries);
      Configuration configuration = new InMemoryConfiguration(
          appConfigurationEntriesOptions);
      jaasAuthenticationProvider.setConfiguration(configuration);
      UserAuthorityGranter authorityGranter = new UserAuthorityGranter();
      UserAuthorityGranter[] authorityGranters = new UserAuthorityGranter[]{authorityGranter};
      jaasAuthenticationProvider.setAuthorityGranters(authorityGranters);
      jaasAuthenticationProvider.afterPropertiesSet();
    } catch (Exception e) {
      LOG.error("Failed to init PAM Authentication", e);
    }
  }
}
org.springframework.security.authentication.jaasDefaultJaasAuthenticationProvidersetAuthorityGranters

Popular methods of DefaultJaasAuthenticationProvider

  • getLoginContextName
  • getConfiguration
  • afterPropertiesSet
  • authenticate
  • setConfiguration
    Sets the Configuration to use for Authentication.
  • <init>
  • handleLogout
  • onApplicationEvent
  • publishFailureEvent
  • publishSuccessEvent
  • setApplicationEventPublisher
  • setApplicationEventPublisher

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getApplicationContext (Context)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Socket (java.net)
    Provides a client-side TCP socket.
  • JButton (javax.swing)
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now