TokenAuthenticator constructor

TokenAuthenticator(
  1. String token, {
  2. String prefix = 'Bearer',
})

Creates a TokenAuthenticator with the given token.

The optional prefix defaults to 'Bearer'. The resulting header value will be "<prefix> <token>".

Implementation

TokenAuthenticator(this.token, {this.prefix = 'Bearer'});