checkAuth method

FutureOr<Message> checkAuth(
  1. Request request
)

Implementation

FutureOr<Message> checkAuth(Request request) {
  if ((authRequired && request.context.accessToken != null) ||
      (!authRequired && request.context.accessToken == null)) {
    return request;
  } else {
    throw UnauthorizedException();
  }
}