DVStudioDevGrant class
The development grant for one run of a development server.
Constructors
- DVStudioDevGrant(String token)
-
const
- DVStudioDevGrant.generate()
-
A new grant with a random 32-character token.
factory
Properties
Methods
-
check(
Request request) → Future< bool> -
Whether
requestcomes from the browser the link was opened in. -
claim(
Request request, DVAdminMount mount) → Response? - The redirect that sets the cookie, for a request carrying the token in its address; null for any other request.
-
link(
String origin, DVAdminMount mount) → String -
The link to print: Studio at
mountonorigin, carrying the token. -
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
Static Methods
-
fromEnvironment(
Map< String, String> environment) → DVStudioDevGrant? -
The grant
dartvel devhanded its backend in environmentVariable, or null when it handed none. A backend restarted on a change keeps the grant, so the link printed once goes on working.
Constants
- The cookie a browser holds the grant in.
- environmentVariable → const String
- Where a development server hands its grant to the backend it starts.
- queryParameter → const String
- The query parameter the printed link carries the token in.