View Javadoc

1   package com.atlassian.plugins.rest.common.security;
2   
3   import java.security.Principal;
4   
5   /**
6    * An authentication context to retrieve the principal and authentication status.
7    * @since 1.0
8    */
9   public interface AuthenticationContext
10  {
11      /**
12       * @return the authenticated principal, {@code null} if none is authenticated.
13       */
14      Principal getPrincipal();
15  
16      /**
17       * @return {@code true} if the principal is authenticated, {@code false} otherwise.
18       */
19      boolean isAuthenticated();
20  }