token method
- Webservice service
Returns the Token for the given service
.
Implementation
Token token(Webservice service) {
return firstWhere(
(token) => token.webservice == service,
orElse: () => throw AuthException(
'',
service,
message: (reason, webservice) {
return 'AuthException: No token found for ${webservice.name}';
},
),
);
}