wrapAsBearerAuthHeaderValue function

String wrapAsBearerAuthHeaderValue(
  1. String token
)

Returns a value that is compliant with the HTTP auth header format by wrapping the provided token as a Bearer auth value. Unlike Basic auth, Bearer tokens are not Base64 encoded as they are expected to already be in the correct format.

Implementation

String wrapAsBearerAuthHeaderValue(String token) {
  return '$bearerAuthSchemeName $token';
}