requireAuthentication method
Defines that this response requires authentication.
Depending of the serve implementation (usually HTTP),
it will send to the client the request for authentication
(in HTTP is the headers WWW-Authenticate
).
Implementation
void requireAuthentication(
{bool require = true, String type = 'Basic', String realm = 'API'}) {
_requiresAuthentication = require;
_authenticationType = type;
_authenticationRealm = realm;
}