EXPOSE REST: Basic Authentication - retrieve username and password

EXPOSE REST: Basic Authentication - retrieve username and password

  
When you expose a REST web service and use "basic" Authentication, the username and password values are passed to the "OnAuthentication" method via the input parameters "Username" and "Password"

If your logic is inside "OnAuthentication" you can just retrieve the values from the input parameters "Username" and "Password".

However if you want to retrieve the "Username" and "Password" within the web service API method itself, is there no other way other than creating your own custom method to do this...?

1) Read the header
2) Get "Authorization" header value
3) Remove "Basic " from the Authorization value
4) Decode Authorization value from base64 with iso-8859-1 to a string 
5) Split the string with colon ":" to get the value username and password.

Shouldnt there be a method built into outsystems platform to get the username/password from the header? (This is not a problem for me, I can do it, but it should be easier!)