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 *
8 * @since 1.0
9 */
10 public interface AuthenticationContext {
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 }