added authentication TELSDN-193: #close
[lispflowmapping.git] / mappingservice / implementation / src / main / java / org / opendaylight / lispflowmapping / implementation / authentication / LispAuthenticationUtil.java
index 1a927c217920672bfc752933f0183559f859086d..a3324d0994cfaef17a34c9406404eaebe0fa338f 100644 (file)
@@ -3,19 +3,16 @@ package org.opendaylight.lispflowmapping.implementation.authentication;
 import org.opendaylight.lispflowmapping.type.lisp.MapNotify;
 import org.opendaylight.lispflowmapping.type.lisp.MapRegister;
 
-public class LispAuthenticationUtil  {
-    
+public class LispAuthenticationUtil {
 
-    public static boolean validate(MapRegister mapRegister) {
+    public static boolean validate(MapRegister mapRegister, String key) {
         ILispAuthentication authentication = LispAuthenticationFactory.getAuthentication(LispKeyIDEnum.valueOf(mapRegister.getKeyId()));
-        return authentication.validate(mapRegister);
+        return authentication.validate(mapRegister, key);
     }
 
-    public static byte[] getAuthenticationData(MapNotify mapNotify) {
+    public static byte[] createAuthenticationData(MapNotify mapNotify, String key) {
         ILispAuthentication authentication = LispAuthenticationFactory.getAuthentication(LispKeyIDEnum.valueOf(mapNotify.getKeyId()));
-        return authentication.getAuthenticationData(mapNotify);
+        return authentication.getAuthenticationData(mapNotify, key);
     }
 
-       
-
 }