e6449ef2f798b02d359ec28801445ea1fd3c30b1
[lispflowmapping.git] / mappingservice / implementation / src / main / java / org / opendaylight / lispflowmapping / implementation / authentication / LispNoAuthentication.java
1 /*
2  * Copyright (c) 2014 Contextream, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.lispflowmapping.implementation.authentication;
9
10 import org.opendaylight.yang.gen.v1.lispflowmapping.rev131031.MapNotify;
11 import org.opendaylight.yang.gen.v1.lispflowmapping.rev131031.MapRegister;
12
13 public class LispNoAuthentication implements ILispAuthentication {
14
15     private static final LispNoAuthentication INSTANCE = new LispNoAuthentication();
16
17     private static byte[] authenticationData;
18
19     public static LispNoAuthentication getInstance() {
20         return INSTANCE;
21     }
22
23     private LispNoAuthentication() {
24         authenticationData = new byte[0];
25     }
26
27     public int getAuthenticationLength() {
28         return 0;
29     }
30
31     public byte[] getAuthenticationData(MapNotify mapNotify, String key) {
32         return authenticationData;
33     }
34
35     public boolean validate(MapRegister mapRegister, String key) {
36         return true;
37     }
38
39 }