Authorization class

Represents an authorization scheme used for authentication.

The Authorization class is designed to handle different types of authorization schemes. It provides methods to parse authorization headers and extract credentials based on the specified authentication type.

Constructors

Authorization({AuthType type = AuthType.none, String value = ''})
Creates an instance of Authorization with the given type and value.
Authorization.parse(String auth)
Parses an authorization header string into an Authorization object.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type AuthType
The type of authorization.
getter/setter pair
value String
The authorization value, typically containing credentials or tokens.
getter/setter pair

Methods

getBasicPassword() String
Extracts the password from a Basic authentication value.
getBasicUsername() String
Extracts the username from a Basic authentication value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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