write method

  1. @override
void write(
  1. Context ctx,
  2. String session
)
override

Writes session data to authorization header

Implementation

@override

/// Writes session data to authorization header
void write(Context ctx, String session) {
  final String? oldHeader =
      ctx.response.headers.value(HttpHeaders.authorizationHeader);
  final headers = AuthHeaders.fromHeaderStr(oldHeader);
  headers.addItem(AuthHeaderItem(scheme, session));
  ctx.response.headers
      .set(HttpHeaders.authorizationHeader, headers.toString());
}