AbstractSessionSendAuthorizationRequest Method (Request, Identity, IEventQueue, CorrelationID, String) |
Namespace: Bloomberglp.Blpapi
public CorrelationID SendAuthorizationRequest( Request request, Identity identity, IEventQueue eventQueue, CorrelationID correlationId, string requestLabel )
Exception | Condition |
---|---|
InvalidOperationException | The session is not started. |
InvalidRequestException | The request is not compliant with the schema for the request. |
DuplicateCorrelationIDException | The specified correlationId is already active for this Session. |
ArgumentException | The specified Identity was not created through this Session or it is the session identity. |
This request can be used by applications to authorize users to receive data from services. If an user is successfully authorized all the entitlements for that user is cached locally. Once authorized the userhandle can be used to make subscriptions and requests as the user. Also the userhandle can be checked to ensure that the user has the required entitlements for accessing data that was retrieved using the default credentials.
This method sends the specified authorizationRequest to a authorization service that is available on this session. The specified correlationId is returned on the response and can be used to correlate the response to this request. If a null correlationId is specified then an internal CorrelationID is generated and returned.
If an eventQueue is specified then all response events for this Authorization Request are published to this eventQueue. The user can block on this event queue for response and can use this as a mechanism to convert this asynchronous request into a synchronous request.
On completion of this requests an "RESPONSE" event is published containing a message with the result of the authorization request. If the user was successfully authorized a "AuthorizationSuccess" message will be generated. If the user was not authorized a "AuthorizationFailure" message will be generated.