Class ODataAuthCallable
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.odata.ODataAuthCallable
-
@VelocityCallable("singleton") public final class ODataAuthCallable extends Object
Velocity callable for authentication with an OData service.
-
-
Constructor Summary
Constructors Constructor Description ODataAuthCallable()
Default constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
connect(ISession p_session, IUser p_user, de.uplanet.lucy.server.auxiliaries.odata.ODataAuthFieldValues p_authValues, String p_strCfgGuid, String p_strServiceGuid)
Returns true, if a connection to the service with the given authentication values could be established.static de.uplanet.lucy.server.auxiliaries.odata.ODataAuthFieldValues
getFieldValues(String p_strCfgGuid, IUser p_user)
static de.uplanet.lucy.server.auxiliaries.odata.ODataAuthRequiredFields
getRequiredFields(String p_strCfgGuid)
static boolean
isAuthenticated(IUser p_user, String p_strCfgGuid, String p_strServiceGuid)
Tests whether a given user is authenticated for a given service.static boolean
isAuthenticated(String p_strDgGuid)
Tests whether the current user is authenticated for a service defined by a datagroup.static void
validateAuthentication(String p_strDgGuid)
Tests whether the current user is authenticated for a service defined by a datagroup.
-
-
-
Method Detail
-
getRequiredFields
public static de.uplanet.lucy.server.auxiliaries.odata.ODataAuthRequiredFields getRequiredFields(String p_strCfgGuid)
-
getFieldValues
public static de.uplanet.lucy.server.auxiliaries.odata.ODataAuthFieldValues getFieldValues(String p_strCfgGuid, IUser p_user)
-
connect
public static boolean connect(ISession p_session, IUser p_user, de.uplanet.lucy.server.auxiliaries.odata.ODataAuthFieldValues p_authValues, String p_strCfgGuid, String p_strServiceGuid)
Returns true, if a connection to the service with the given authentication values could be established.- Parameters:
p_session
- The session.p_user
- The user.p_authValues
- The authentication values.p_strCfgGuid
- The configuration GUID.p_strServiceGuid
- The service GUID.- Returns:
- Returns
true
, if connection could be established, otherwise false.
-
isAuthenticated
public static boolean isAuthenticated(IUser p_user, String p_strCfgGuid, String p_strServiceGuid)
Tests whether a given user is authenticated for a given service.- Parameters:
p_user
- The user.p_strCfgGuid
- Ther service configuration GUID.p_strServiceGuid
- The service GUID.- Returns:
true
, if user is authenticated, otherwise false.
-
isAuthenticated
public static boolean isAuthenticated(String p_strDgGuid)
Tests whether the current user is authenticated for a service defined by a datagroup.- Parameters:
p_strDgGuid
- The datagroup info.- Returns:
true
, if user is authenticated.
-
validateAuthentication
public static void validateAuthentication(String p_strDgGuid)
Tests whether the current user is authenticated for a service defined by a datagroup.- Parameters:
p_strDgGuid
- The datagroup info.- Throws:
de.uplanet.lucy.server.odata.ODataNotAuthenticatedException
- If the user is not authenticated.
-
-