AuthConfig class

Authentication configuration for the CivitAI API.

Constructors

AuthConfig({required String token, AuthMethod method = AuthMethod.apiKey, List<ApiScope> scopes = const [ApiScope.read]})
Creates a new authentication configuration.
const
AuthConfig.apiKey(String apiKey, {List<ApiScope> scopes = const [ApiScope.read]})
Creates an API key authentication configuration.
factory
AuthConfig.bearer(String token)
Creates a bearer token authentication configuration.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
method AuthMethod
Authentication method to use.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopes List<ApiScope>
Scopes for the API key.
final
token String
Token or API key for authentication.
final

Methods

hasScope(ApiScope scope) bool
Whether this authentication configuration has a specific scope.
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