HS.REST.Handler
abstract class HS.REST.Handler extends %pkg.isc.rest.handler
Base REST handler for all dispatch classes to extend. Acts as an intermediate layer between HS code and isc.rest to enforce best practices relevant to HS.Method Inventory
- AuthenticationStrategy()
- CheckPermission()
- GetUserResource()
- IsPublic()
- LogErrorStatus()
- ModifyOpenAPISpecification()
- OnHandleCorsRequest()
- OnPreDispatch()
Methods
classmethod AuthenticationStrategy() as %Dictionary.Classname
Inherited description: Subclasses must override this to define a custom authentication strategy class.
final classmethod CheckPermission(pEndpoint As %String, pUserContext As %RegisteredObject, ByRef URLParams) as %Boolean
Inherited description: Checks the user's permission for a documentation-related endpoint.
pEndpoint may be one of:
- /build-documentation
- /openapi.json
classmethod GetUserResource(pFullUserInfo As %DynamicObject) as %pkg.isc.rest.model.iSerializable
Subclasses may override this method to provide information about the logged-in user.
- pFullUserInfo: dynamic object with full user info provided by the authentication strategy
Returns 1 if a given combination of URL + method should be considered public.
That means that UnknownUser is not rejected with a 401. By default only /auth/status is
permitted for unauthenticated users.
@API.Overridable
@Argument pUrl URL of incoming request. Same as in OnPreDispatch(). @Argument pMethod HTTP method of incoming request. Same as in OnPreDispatch().
@API.Overridable
@Argument pUrl URL of incoming request. Same as in OnPreDispatch(). @Argument pMethod HTTP method of incoming request. Same as in OnPreDispatch().
classmethod LogErrorStatus(pStatus As %Status)
Any additional logging of errors during requests.
@API.Overrideable
@API.Overrideable
classmethod ModifyOpenAPISpecification(ByRef specification As %pkg.isc.rest.openAPI.model.openAPI)
Used to modify a generated OpenAPI specification before it is finalized, implement any custom-changes you want to make to
the OpenAPI specification as a whole here.
If you want to modify something class-specific (resource/action endpoints, schemas generated for classes), consider using the
ModifyOpenAPISpecification() ClassMethod of the class in question instead.
@API.Overrideable
@API.Overrideable
This is the CORS request handler. User should override this method in their subclass
if they don't want the default behavior from super class.
@API.Overrideable
@API.Overrideable
final classmethod OnPreDispatch(pUrl As %String, pMethod As %String, ByRef pContinue As %Boolean) as %Status
Inherited description: This method Gets called prior to dispatch of the request. Put any common code here
that you want to be executed for EVERY request. If pContinue is set to 0, the
request will NOT be dispatched according to the UrlMap. If this case it's the
responsibility of the user to return a response.
Inherited Members
Inherited Methods
- %ClassIsLatestVersion()
- %ClassName()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %New()
- %OriginalNamespace()
- %PackageName()
- %SetModified()
- AcceptsContentType()
- AccessCheck()
- BuildDocumentationEndpoint()
- CheckAllPermissions()
- CheckResourcePermitted()
- CollectionQuery()
- ConsoleBuildOpenAPIDocumentation()
- Construct()
- ConvertParameter()
- Create()
- Decrypt()
- Delete()
- DispatchClassAction()
- DispatchInstanceAction()
- DispatchRequest()
- DrawCSS3STYLE()
- DrawHEAD()
- DrawSTHEAD()
- DrawSTTitle()
- DrawSTYLE()
- DrawTitle()
- DrawTitleSection()
- Encrypt()
- Error()
- EscapeHTML()
- EscapeURL()
- GetAuthChallenge()
- GetDocumentationBuildStatus()
- GetOpenAPISpecification()
- GetUserContext()
- GetUserInfo()
- Http403()
- Http404()
- Http405()
- Http500()
- HyperEventCall()
- HyperEventHead()
- Include()
- InsertHiddenField()
- InsertHiddenFields()
- IsPrivate()
- Link()
- LogOut()
- Login()
- OnErrorSetup()
- OnHTTPHeader()
- OnHandleOptionsRequest()
- OnLoginPage()
- OnPage()
- OnPageError()
- OnPostHTTP()
- OnPostHyperEvent()
- OnPreHTTP()
- OnPreHyperEvent()
- OnSecurityTokenPage()
- Page()
- QuoteJS()
- Retrieve()
- RewriteURL()
- SetLogLevel()
- SetResponseHeaderIfEmpty()
- ShowError()
- StartTimer()
- StatusToJSON()
- StatusToProxyObject()
- StopTimer()
- SupportedVerbs()
- Supports()
- ThrowError()
- UnescapeHTML()
- UnescapeURL()
- Update()