MQZ_AUTHENTICATE_USER (Authenticate user) on IBM i
This function is provided by a MQZAS_VERSION_5 authorization service component. It is invoked by the queue manager to authenticate a user, or to set identity context fields.
It is invoked when an IBM MQ user application context is established. This happens 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
The MQZ_AUTHENTICATE_USER call has the following parameters.
- QMgrName (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 (MQCSP) - input
- Security parameters.
Data relating to the user ID, password, and authentication type.
During an MQCONN MQI call this parameter contains null, or default values.
- ApplicationContext (MQZAC) - input
- Application context.
Data relating to the calling application. See MQZAC (Application context) on IBM i for details. During every MQCONN or MQCONNX MQI call, the user context information in the MQZAC structure is reacquired.
- IdentityContext (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) on IBM i for more details on the MQZIC structure.
- CorrelationPtr (MQPTR) - output
- Correlation pointer.
Specifies the address of any correlation data. This pointer is then passed on to other OAM calls.
- ComponentData (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 components 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 (MQLONG) - output
- Continuation flag.
The following values can be specified:
- MQZCI_DEFAULT
- Continuation dependent on other components.
- MQZCI_STOP
- Do not continue with next component.
- CompCode (MQLONG) - output
- Completion code.
It is one of the following:
- MQCC_OK
- Successful completion.
- MQCC_FAILED
- Call failed.
- Reason (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);The parameters passed to the service are declared 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 on IBM i