Codota Logo
JaasAuthenticationProviderTests$MockLoginContext
Code IndexAdd Codota to your IDE (free)

How to use
JaasAuthenticationProviderTests$MockLoginContext
in
org.springframework.security.authentication.jaas

Best Java code snippets using org.springframework.security.authentication.jaas.JaasAuthenticationProviderTests$MockLoginContext (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-security

@Test
public void testLogout() throws Exception {
  MockLoginContext loginContext = new MockLoginContext(
      jaasProvider.getLoginContextName());
  JaasAuthenticationToken token = new JaasAuthenticationToken(null, null,
      loginContext);
  SecurityContext context = SecurityContextHolder.createEmptyContext();
  context.setAuthentication(token);
  SessionDestroyedEvent event = mock(SessionDestroyedEvent.class);
  when(event.getSecurityContexts()).thenReturn(Arrays.asList(context));
  jaasProvider.handleLogout(event);
  assertThat(loginContext.loggedOut).isTrue();
}
org.springframework.security.authentication.jaasJaasAuthenticationProviderTests$MockLoginContext

Most used methods

  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
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