package at.gv.egovernment.moa.id.proxy;
import java.util.Map;
import at.gv.egovernment.moa.id.config.proxy.OAConfiguration;
import at.gv.egovernment.moa.id.data.AuthenticationData;
/**
* Determines authentication parameters and headers to be added to a {@link java.net.URLConnection}
* to the remote online application.
* Utilizes {@link OAConfiguration} and {@link AuthenticationData}.
*
* @author Paul Ivancsics
* @version $Id$
*/
public interface LoginParameterResolver {
/** Constants used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
,
* naming predicates used by the LoginParameterResolver
. */
public static final String MOAGivenName = "MOAGivenName";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOAFamilyName = "MOAFamilyName";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOADateOfBirth = "MOADateOfBirth";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOABPK = "MOABPK";
/** Constant used in MOAIDConfiguration-1.3.xsd
, type MOAAuthDataType
*/
public static final String MOAWBPK = "MOAWBPK";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOAPublicAuthority = "MOAPublicAuthority";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOABKZ = "MOABKZ";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOAQualifiedCertificate = "MOAQualifiedCertificate";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOAStammzahl = "MOAStammzahl";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOAIdentificationValueType = "MOAIdentificationValueType";
/** Constant used in MOAIDConfiguration-1.2.xsd
, type MOAAuthDataType
*/
public static final String MOAIPAddress = "MOAIPAddress";
/**
* Returns authentication headers to be added to a URLConnection.
*
* @param oaConf configuration data
* @param authData authentication data
* @param clientIPAddress client IP address
* @param businessService boolean value for recognizing (w)bPK-mode
* @return A map, the keys being header names and values being corresponding header values.
*
In case of authentication type "basic-auth"
, header fields
* username
and password
.
*
In case of authentication type "header-auth"
, header fields
* derived from parameter mapping and authentication data provided.
*
Otherwise, an empty map.
*/
public Map getAuthenticationHeaders(
OAConfiguration oaConf,
AuthenticationData authData,
String clientIPAddress,
boolean businessService) throws LoginParameterResolverException, NotAllowedException;
/**
* Returns request parameters to be added to a URLConnection.
*
* @param oaConf configuration data
* @param authData authentication data
* @param clientIPAddress client IP address
* @param businessService boolean value for recognizing (w)bPK-mode
* @return A map, the keys being parameter names and values being corresponding parameter values.
*
In case of authentication type "param-auth"
, parameters
* derived from parameter mapping and authentication data provided.
*
Otherwise, an empty map.
*/
public Map getAuthenticationParameters(
OAConfiguration oaConf,
AuthenticationData authData,
String clientIPAddress,
boolean businessService) throws LoginParameterResolverException, NotAllowedException;
public void configure(String configuration, Boolean businessService) throws LoginParameterResolverException;
}