Hello,
I'm making rest API service with Authentication.
How I can return HTTP Status 403 if user enter invalid login or password?
Now returning Http status 200.
Class RestAPI Extends %CSP.REST
{
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Map Prefix="/restforms" Forward="Form.REST.Main"/>
<Route Url="/auth/:login/:pass" Method="GET" Call="CheckUser" Cors="true"/>
</Routes>
}
ClassMethod CheckUser(userAw, pwdAw) As %String
{
set %response.ContentType = "application/json"
// my code to check auth
Set object = {}
Set object.status = -1
Set object.message = "HTTP/1.


.png)