MQZ_AUTHENTICATE_USER - Authenticate user

This function is provided by an MQZAS_VERSION_5 authorization service component, and is invoked by the queue manager to authenticate a user, or to set identity context fields. It is invoked when the IBM MQ user application context is established.

The application context is established during connect calls at the point where the application's user context is initialized, and at each point where the application's user context is changed. Each time a connect call is made, the application's user context information is reacquired in the IdentityContext field.

The function identifier for this function (for MQZEP) is MQZID_AUTHENTICATE_USER.


Syntax

MQZ_AUTHENTICATE_USER ( QMgrName , SecurityParms , ApplicationContext , IdentityContext , CorrelationPtr , ComponentData , Continuation , CompCode , Reason )


Parameters

    QMgrName
    Type: MQCHAR48 - input

    Queue manager name. The name of the queue manager calling the component. This name is padded with blanks to the full length of the parameter; the name is not terminated by a null character.

    The queue manager name is passed to the component for information; the authorization service interface does not require the component to use it in any defined manner.

    SecurityParms
    Type: MQCSP - input

    Security parameters. Data relating to the user ID, password, and authentication type. If the AuthenticationType attribute of the MQCSP structure is specified as MQCSP_AUTH_USER_ID_AND_PWD, both the user ID and password are compared against the equivalent fields in the IdentityContext (MQZIC) parameter to determine whether they match . For more information, see MQCSP - Security parameters.

    During an MQCONN MQI call this parameter contains null, or default values.

    ApplicationContext
    Type: MQZAC - input

    Application context. Data relating to the calling application. See MQZAC - Application context for details.

    During every MQCONN or MQCONNX MQI call, the user context information in the MQZAC structure is reacquired.

    IdentityContext
    Type: MQZIC - input/output

    Identity context. On input to the authenticate user function, this identifies the current identity context. The authenticate user function can change this, at which point the queue manager adopts the new identity context. See MQZIC - Identity context for more details on the MQZIC structure.

    CorrelationPtr
    Type: MQPTR - output

    Correlation pointer. Specifies the address of any correlation data. This pointer is subsequently passed on to other OAM calls.

    ComponentData
    Type: MQBYTE x ComponentDataLength - input/output

    Component data. This data is kept by the queue manager on behalf of this particular component; any changes made to it by any of the functions provided by this component are preserved, and presented the next time one of this component's functions is called.

    The length of this data area is passed by the queue manager in the ComponentDataLength parameter of the MQZ_INIT_AUTHORITY call.

    Continuation
    Type: MQLONG - output Continuation flag. We can specify the following values:

      MQZCI_DEFAULT
      Continuation dependent on other components.

      MQZCI_STOP
      Do not continue with next component.

    CompCode
    Type: MQLONG - output Completion code. It must be one of the following values:

      MQCC_OK
      Successful completion.

      MQCC_FAILED
      Call failed.

    Reason
    Type: MQLONG - output

    Reason code qualifying CompCode.

    If CompCode is MQCC_OK:

      MQRC_NONE
      (0, X'000') No reason to report.

    If CompCode is MQCC_FAILED:

      MQRC_SERVICE_ERROR
      (2289, X'8F1') Unexpected error occurred accessing service.

    For more information about these reason codes, see Reason codes.


C invocation

MQZ_AUTHENTICATE_USER (QMgrName, SecurityParms, ApplicationContext,
                   IdentityContext, &CorrelationPtr, ComponentData,
                   &Continuation, &CompCode, &Reason);
Declare the parameters passed to the service as follows:
MQCHAR48  QMgrName;           /* Queue manager name */
MQCSP     SecurityParms;      /* Security parameters */
MQZAC     ApplicationContext; /* Application context */
MQZIC     IdentityContext;    /* Identity context */
MQPTR     CorrelationPtr;     /* Correlation pointer */
MQBYTE    ComponentData[n];   /* Component data */
MQLONG    Continuation;       /* Continuation indicator set by
                                 component */
MQLONG    CompCode;           /* Completion code */
MQLONG    Reason;             /* Reason code qualifying CompCode */
Parent topic: Installable services interface reference information