Refactor AAA app in preparation for clustered operation.

* Add formal API for accessing auth state information rather than directly
looking up static maps.
* Move static maps in StateMachine to non-static maps in AaaManager
* Manage identifier space used for requests/replies better
* Refactored state machine timeout mechansim

Change-Id: Ie53c3a66ac1619e10607d9926b71747a333317f3
diff --git a/api/src/main/java/org/opencord/aaa/AuthenticationRecord.java b/api/src/main/java/org/opencord/aaa/AuthenticationRecord.java
new file mode 100644
index 0000000..5433fd9
--- /dev/null
+++ b/api/src/main/java/org/opencord/aaa/AuthenticationRecord.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.opencord.aaa;
+
+import org.onlab.packet.MacAddress;
+import org.onosproject.net.ConnectPoint;
+
+/**
+ * Describes state of an authentication attempt.
+ */
+public class AuthenticationRecord {
+
+    private final ConnectPoint supplicantConnectPoint;
+
+    private final byte[] username;
+
+    private final MacAddress supplicantAddress;
+
+    private final String state;
+
+    /**
+     * Creates a new authentication record.
+     *
+     * @param supplicantConnectPoint connect point
+     * @param username user name
+     * @param supplicantAddress MAC address of supplicant
+     * @param state authentication state
+     */
+    public AuthenticationRecord(ConnectPoint supplicantConnectPoint, byte[] username,
+                                MacAddress supplicantAddress, String state) {
+        this.supplicantConnectPoint = supplicantConnectPoint;
+        this.username = username;
+        this.supplicantAddress = supplicantAddress;
+        this.state = state;
+    }
+
+    /**
+     * Gets the connect point of supplicant.
+     *
+     * @return connect point
+     */
+    public ConnectPoint supplicantConnectPoint() {
+        return supplicantConnectPoint;
+    }
+
+    /**
+     * Gets the username of supplicant.
+     *
+     * @return username
+     */
+    public byte[] username() {
+        return username;
+    }
+
+    /**
+     * Gets the MAC address of the supplicant.
+     *
+     * @return MAC address
+     */
+    public MacAddress supplicantAddress() {
+        return supplicantAddress;
+    }
+
+    /**
+     * Gets the current state of the authentication attempt.
+     *
+     * @return state
+     */
+    public String state() {
+        return state;
+    }
+}