tokenResponse static method Null safety

Response tokenResponse(
  1. AuthToken token
)

Transforms a AuthToken into a Response object with an RFC6749 compliant JSON token as the HTTP response body.

Implementation

static Response tokenResponse(AuthToken token) {
  return Response(
    HttpStatus.ok,
    {"Cache-Control": "no-store", "Pragma": "no-cache"},
    token.asMap(),
  );
}