ReadOnlyAuthenticator class
The ReadOnlyAuthenticator class allows for the creation of an Authenticator instance which is not associated with any reddit account. As the name implies, the ReadOnlyAuthenticator can only be used to make read-only requests to the Reddit API that do not require access to a valid Reddit user account. Refer to Reddit's documentation for descriptions of valid app types.
- Inheritance
-
- Object
- Authenticator
- ReadOnlyAuthenticator
Properties
- credentials → Credentials
-
The credentials associated with this authenticator instance.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isValid → bool
-
A flag representing whether or not this authenticator instance is valid.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userAgent → String
-
The user agent value to be presented to Reddit.
no setterinherited
Methods
-
Not implemented for Authenticators other than WebAuthenticator.
inherited
-
delete(
Uri path, {Map< String, String> ? body}) → Future -
Make a simple
DELETE
request.inherited -
get(
Uri path, {Map< String, String?> ? params, bool followRedirects = false}) → Future -
Make a simple
GET
request.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
Uri path, Map< String, String?> ? body, {Map<String, Uint8List?> ? files, Map? params}) → Future -
Make a simple
POST
request.inherited -
put(
Uri path, {Map< String, String> ? body}) → Future -
Make a simple
PUT
request.inherited -
refresh(
) → Future< void> -
Request a new access token from the Reddit API. Throws a
DRAWAuthenticationError if the Authenticator is not yet initialized.
inherited
-
revoke(
) → Future< void> -
Revokes any outstanding tokens associated with the Authenticator.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
url(
List< String> scopes, String state, {String duration = 'permanent', bool compactLogin = false}) → Uri -
Not implemented for Authenticators other than WebAuthenticator.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
DRAWConfigContext config, AuthorizationCodeGrant grant) → Future< ReadOnlyAuthenticator> -
createUntrusted(
DRAWConfigContext config, AuthorizationCodeGrant grant, String? deviceId) → Future< ReadOnlyAuthenticator>