2 * Copyright (c) 2014 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.aaa.api;
12 * Authentication service to provide authentication context.
14 public interface AuthenticationService {
16 * Retrieve the current security context, or null if none exists.
18 * @return security context
23 * Set the current security context. Only {@link TokenAuth} should set
24 * security context based on the authentication result.
29 void set(Authentication auth);
32 * Clear the current security context.
37 * Checks to see if authentication is enabled.
39 * @return true if it is, false otherwise
41 boolean isAuthEnabled();