Interface AuthenticatedSessions


public interface AuthenticatedSessions
This class represents all the currently authenticated sessions This is a collection of session that are deemed to be fresh. The matching methods can be used to find sessions using acr's.
Since:
3.0.0
  • Method Details

    • isEmpty

      boolean isEmpty()
      Returns:
      true if no sessions are available
    • isNotEmpty

      boolean isNotEmpty()
      Returns:
      true if sessions are available
    • contains

      boolean contains(String acr)
      Parameters:
      acr - the acr to look for
      Returns:
      true if the acr is present in the current sessions
    • all

      Returns:
      all sessions
    • matching

      Find a session that matches the given acr
      Parameters:
      acr - to search for
      Returns:
      The session if found, or null otherwise
    • matching

      AuthenticatedSessions matching(String... acceptableAcrs)
      Find all session matching the acrs
      Parameters:
      acceptableAcrs - a variable number of acrs
      Returns:
      A new collection with just the sessions matching the acrs
    • matching

      AuthenticatedSessions matching(Collection<String> acceptableAcrs)
      Find all sessions matching the collection of acrs
      Parameters:
      acceptableAcrs - a collection of acrs
      Returns:
      A new collection with just the sessions matching the acrs
    • newest

      Get the newest session
      Returns:
      the newest session