read method

  1. @override
String? read(
  1. Context ctx
)
override

Reads the session data from authorization header

Implementation

@override

/// Reads the session data from authorization header
String? read(Context ctx) {
  String? authHeaderStr =
      ctx.req.headers.value(HttpHeaders.authorizationHeader);
  AuthHeaderItem? item =
      AuthHeaderItem.fromHeaderBySchema(authHeaderStr, scheme);
  if (item == null) {
    return null;
  }
  return item.credentials;
}