AppPasswordAuth class final
Authentication using Application Passwords which are supported on all Wordpress installations version 5.6 or higher.
- Inheritance
-
- Object
- IAuthorization
- AppPasswordAuth
Constructors
- AppPasswordAuth({required String userName, required String password, WordpressEvents? events})
Properties
- baseUrl ↔ Uri
-
The base url of the wordpress site.
latefinalinherited
- events ↔ WordpressEvents?
-
The events to listen to.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerKey → String
-
The header key to use for authorization.
finalinherited
- isDefault → bool
-
Gets if this is an invalid or default authorization instance without username or password fields.
no setterinherited
- isValidAuth → bool
-
Gets if this authorization instance has valid authentication nounce. (token/encryptedToken)
no setteroverride
- password → String
-
The password
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scheme → String
-
Gets the authorization scheme.
no setteroverride
- userName → String
-
The username
finalinherited
Methods
-
Called to authorize a request if the request requires authentication.
override
-
clientFactoryProvider(
Dio client) → void -
Provides this instance of IAuthorization with the Dio client instance for requests.
override
-
generateAuthUrl(
) → Future< String?> -
After
authorize()
is called, to get the authorization header string, (ie, '{scheme} {token}') the client calls this method to generate the raw string.override -
initialize(
{required Uri baseUrl}) → Future< bool> -
Helps to initialize authorization instance with internal requesting client passed as a parameter.
inherited
-
isAuthenticated(
) → Future< bool> -
Called to check if this instance has a valid authentication nounce and generateAuthUrl() won't return null.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → Future< bool> -
Called to validate token. (such as in JWT auth)
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited