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

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token → String
final

Methods

check(Request request) → Future<bool>
Whether request comes 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.
The link to print: Studio at mount on origin, 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 dev handed 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

cookieName → const String
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.