2.2 Authorization AOC bridge
AOC bridge authorization is much simpler than XML bridge authorization. AOC bridge supports only explicit logging in; either “in advance” or “on demand”. The difference between these is whether the log-in information is sent during the opening of the bridge (in advance) or the bridge requests these when necessary (on demand).
If authorization of AOC bridge is required and the field pLoginName in the structure NSB_AOC_OPEN_INFO is not NULL, then the process of logging in will use the fields pLoginName and pPassword. However if pLoginName is NULL, call-back function pGetIdentify is called if its address is found in the structure NSB_AOC_OPEN_INFO. Otherwise opening of the AOC bridge ends with error NSB_STATUS_UNAUTHORIZED.
Two parameters are sent to the call-back function. The first is the value of the field pGetIdentityParam from the structure NSB_AOC_OPEN_INFO and the other is pointer at the structure NSB_AOC_IDENTITY. This structure contains prepared pointers pointing at the buffers, where the called function is to fill in the log-in data. The function returns the value type BOOL. TRUE is returned when the log-in data were filled in and FALSE when the process of logging in was terminated. In case access was denied based on the data filled in call-back is repeated and the application can fill in new log-in data or terminate the process of logging in.