Class ODataAuthCallable


  • @VelocityCallable("singleton")
    public final class ODataAuthCallable
    extends Object
    Velocity callable for authentication with an OData service.
    • Constructor Detail

      • ODataAuthCallable

        public ODataAuthCallable()
        Default constructor.
    • 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.