EMS.ResourceTypes.TEMSResourceEndPoint.DoAuthorizeRequest

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DoAuthorizeRequest(const AContext: TEndpointContext); virtual;

C++

virtual void __fastcall DoAuthorizeRequest(Ems::Resourceapi::TEndpointContext* const AContext);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
EMS.ResourceTypes.pas
EMS.ResourceTypes.hpp
EMS.ResourceTypes TEMSResourceEndPoint

Description

Uses the information on the specified endpoint context, such as the user or the types of authentication that the user uses, to authenticate the incoming request.

TEMSCommonResource.HandleRequest calls DoAuthorizeRequest on one of its endpoint objects that can handle the specified endpoint context. After TEMSCommonResource.HandleRequest calls DoAuthorizeRequest, TEMSCommonResource.HandleRequest calls DoHandleRequest on that same endpoint object.

The default implementation of DoAuthorizeRequest does nothing. You should change the implementation of DoAuthorizeRequest in subclasses of TEMSResourceEndPoint to handle the authentication process, and store the result of the authentication process somewhere in your TEMSResourceEndPoint subclass, so that DoHandleRequest can use the result of the authentication process to determine the content of the outgoing response.

If your implementation cannot authenticate the request, call RaiseUnauthorized on the Response property of the specified request context.