DVPlatformApi class
The platform API a backend process serves.
Constructors
- DVPlatformApi(DVPlatformApiConfig config, {required DVDatabaseAdapter? database(), DateTime clock()?})
Properties
- config → DVPlatformApiConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
String? authorization, {String? tenant}) → Future< DVApiAuthentication> -
Resolves
authorizationto a principal ontenant, or the current tenant when none is given. -
keys(
) → Future< DVApiKeys> - The keys over this process's database, schema ensured.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
oauthProvider(
) → Future< DVOAuthProvider?> -
The OAuth provider, or null when
dartvel.platformApi.oauthis off. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- installed → DVPlatformApi?
-
The platform API this process serves, or null when it declares none.
no setter
Static Methods
-
authenticateRequest(
String? authorization) → Future< DVApiAuthentication> -
The authentication stage for a request whose
Authorizationheader isauthorization, on the tenant the request resolved to. -
credentialOf(
String? authorization) → String? -
The platform credential in an
Authorizationheader, or null when it carries none -- which includes the application's own bearer tokens. -
install(
DVPlatformApiConfig config, {required DVDatabaseAdapter? database(), DateTime clock()?}) → DVPlatformApi -
Makes
configthe platform API of this process. Called by the generatedstartBackend. -
uninstall(
) → void - Takes the installed platform API away, for a test.
Constants
- accessTokenPrefix → const String
- Every access token the provider issues starts with this.