Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 7a83cd5

Browse files
committed
401 -> 403 status, http auth error
1 parent 29d63cc commit 7a83cd5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Workflow/AbstractREST.cls.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,22 @@ Called for a REST page in the event of a login being required
339339
Return $$$OK
340340
}
341341
342-
Quit ##super(skipheader)
342+
#; Don't want the session token
343+
Set %response.OutputSessionToken=0
344+
345+
#; Set the Http Status
346+
Set %response.Status="403 Forbidden"
347+
348+
#; We want Basic authentication
349+
Do %response.SetHeader("WWW-Authenticate","Basic")
350+
351+
#; Write out the header
352+
Do %response.WriteHTTPHeader()
353+
354+
Write "{""Error"":""Access Denied""}"
355+
356+
#; Done
357+
Quit $$$OK
343358
]]></Implementation>
344359
</Method>
345360

0 commit comments

Comments
 (0)