Skip to content

Commit

Permalink
Added missing copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
robcalla committed Oct 12, 2018
1 parent 9271b7c commit 3c87fa2
Show file tree
Hide file tree
Showing 8 changed files with 643 additions and 557 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,50 @@
package it.eng.idra.authentication;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Response;

import it.eng.idra.beans.ODFAuthenticationMethod;
import it.eng.idra.beans.ODFProperty;
import it.eng.idra.utils.PropertyManager;

public abstract class AuthenticationManager {

public abstract Object login(String username, String password, String code) throws Exception;

public abstract Response logout(HttpServletRequest username) throws Exception;

public abstract Object getToken(String username, String code) throws Exception;

public abstract Boolean validateToken(Object token) throws Exception;

public abstract Class<?> getFilterClass() throws ClassNotFoundException;

public static AuthenticationManager getActiveAuthenticationManager() {

switch (ODFAuthenticationMethod.valueOf(PropertyManager.getProperty(ODFProperty.AUTHENTICATION_METHOD))) {

case FIWARE:
return FiwareIDMAuthenticationManager.getInstance();
default:
return BasicAuthenticationManager.getInstance();
}

}
}
/*******************************************************************************
* Idra - Open Data Federation Platform
* Copyright (C) 2018 Engineering Ingegneria Informatica S.p.A.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package it.eng.idra.authentication;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Response;

import it.eng.idra.beans.ODFAuthenticationMethod;
import it.eng.idra.beans.ODFProperty;
import it.eng.idra.utils.PropertyManager;

public abstract class AuthenticationManager {

public abstract Object login(String username, String password, String code) throws Exception;

public abstract Response logout(HttpServletRequest username) throws Exception;

public abstract Object getToken(String username, String code) throws Exception;

public abstract Boolean validateToken(Object token) throws Exception;

public abstract Class<?> getFilterClass() throws ClassNotFoundException;

public static AuthenticationManager getActiveAuthenticationManager() {

switch (ODFAuthenticationMethod.valueOf(PropertyManager.getProperty(ODFProperty.AUTHENTICATION_METHOD))) {

case FIWARE:
return FiwareIDMAuthenticationManager.getInstance();
default:
return BasicAuthenticationManager.getInstance();
}

}
}

0 comments on commit 3c87fa2

Please sign in to comment.