Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This hook will be called by the Authentication Layer of the Control Layer when a request is received to check with the upper application what rights are associated with this request.

Prototype

Excerpt


Code Block
          AUTH_RIGHT  HTTPsAuth_GetRequiredRightsHook (const  HTTPs_INSTANCE  *p_instance,
                                                       const  HTTPs_CONN      *p_conn);


Arguments

p_instance

Pointer to the instance structure (read only).

p_conn

Pointer to the connection structure (read only).

Return Values

The authorization right level for this HTTP transaction.

Required Configuration

None.

Notes / Warnings

None.

Example Template

Code Block
languagecpp
titleListing - Get Required Rights Hook Example
linenumberstrue
#define  HTTP_USER_ACCESS  AUTH_RIGHT_2

/*
*********************************************************************************************************
*                                    AppGlobal_Auth_GetRequiredRightsHook()
*
* Description : Returns the rights required to fulfill the needs of a given request.
*
* Argument(s) : p_instance  Pointer to the HTTP server instance object.
*
*               p_conn      Pointer to the HTTP connection object.
*
* Return(s)   : returns the authorization right level for this example application.
*
* Caller(s)   : (HTTPs_AUTHORIZATION_CFG *)->GetRequiredRights()
*
* Note(s)     : none.
*********************************************************************************************************
*/

AUTH_RIGHT  AppGlobal_Auth_GetRequiredRightsHook (const  HTTPs_INSTANCE  *p_instance,
                                                  const  HTTPs_CONN      *p_conn)
{
    return (HTTP_USER_ACCESS);
}