Jonathan Hart | 5db4453 | 2018-07-12 18:13:54 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.opencord.aaa; |
| 18 | |
Jonathan Hart | 612651f | 2019-11-25 09:21:43 -0800 | [diff] [blame] | 19 | import org.onlab.packet.MacAddress; |
Jonathan Hart | 5db4453 | 2018-07-12 18:13:54 -0700 | [diff] [blame] | 20 | import org.onosproject.event.ListenerService; |
| 21 | |
| 22 | /** |
Jonathan Hart | 612651f | 2019-11-25 09:21:43 -0800 | [diff] [blame] | 23 | * Service for interacting with authentication state. |
Jonathan Hart | 5db4453 | 2018-07-12 18:13:54 -0700 | [diff] [blame] | 24 | */ |
| 25 | public interface AuthenticationService extends |
| 26 | ListenerService<AuthenticationEvent, AuthenticationEventListener> { |
Jonathan Hart | 612651f | 2019-11-25 09:21:43 -0800 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * Gets records of authentications that are completed or in progress. |
| 30 | * |
| 31 | * @return list of authentication records |
| 32 | */ |
Jonathan Hart | 9d1ce80 | 2020-01-28 10:45:08 -0800 | [diff] [blame] | 33 | Iterable<AuthenticationRecord> getAuthenticationRecords(); |
Jonathan Hart | 612651f | 2019-11-25 09:21:43 -0800 | [diff] [blame] | 34 | |
| 35 | /** |
| 36 | * Removes an authentication record. |
| 37 | * |
| 38 | * @param mac MAC address of record to remove |
Jonathan Hart | 9d1ce80 | 2020-01-28 10:45:08 -0800 | [diff] [blame] | 39 | * @return true if a record was removed, otherwise false |
Jonathan Hart | 612651f | 2019-11-25 09:21:43 -0800 | [diff] [blame] | 40 | */ |
| 41 | boolean removeAuthenticationStateByMac(MacAddress mac); |
| 42 | |
Shubham Sharma | 544ffa2 | 2020-02-13 06:41:02 +0000 | [diff] [blame] | 43 | /** |
| 44 | * Gets the machine stats based on machine session id. |
| 45 | * |
| 46 | * @param sessionID SessionID of machine |
| 47 | * @return AaaSupplicantMachineStats object |
| 48 | */ |
| 49 | AaaSupplicantMachineStats getSupplicantMachineStats(String sessionID); |
| 50 | |
Jonathan Hart | 5db4453 | 2018-07-12 18:13:54 -0700 | [diff] [blame] | 51 | } |