BasicCredential class

A HTTP Basic Credential for the Authorization header.

Inheritance

Constructors

BasicCredential(String username, String password)
BasicCredential.base64(String base64)
Instantiate using a base64 encoded credential, in format $username:$password.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
password String
Plain password of the credential.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
Returns type Basic.
no setteroverride
username String
Plain username of the credential.
final
usesAuthorizationHeader bool
Returns true.
no setteroverride

Methods

buildAuthorizationHeaderLine() String
Builds the Authorization header.
override
buildBody(HttpRequestBody body) HttpRequestBody?
Builds the HttpRequest body. Used by credentials that injects tokens/credentials in the body.
inherited
buildURL(String url) String?
Builds the HttpRequest URL. Used by credentials that injects tokens/credentials in the URL.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromJSON(dynamic json) BasicCredential?