CookieAuthSuccess class
An AuthSuccess whose cookie-delivered secrets are hidden from
serialization, so they only reach the browser via Set-Cookie while
server-side code can still read them (e.g. to attach metadata to the
newly issued token).
- Implemented types
- Available extensions
Constructors
- CookieAuthSuccess(AuthSuccess authSuccess, {bool maskToken = false, bool maskRefreshToken = false})
-
Wraps
authSuccess, masking the fields that were delivered as cookies.
Properties
- authStrategy ↔ String
-
The authentication strategy used for this session.
getter/setter pairoverride
- authUserId ↔ UuidValue
-
The AuthUser this session belongs to.
getter/setter pairoverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- jwtRefreshTokenId → UuidValue
-
Available on AuthSuccess, provided by the AuthSuccessJwtRefreshTokenId extension
Returns the JWT refresh token ID from the AuthSuccess.refreshToken.no setter - maskRefreshToken → bool
-
Whether refreshToken is delivered as a cookie and hidden from
serialization.
final
- maskToken → bool
-
Whether token is delivered as a cookie and hidden from serialization.
final
- refreshToken ↔ String?
-
Optional refresh token.
getter/setter pairoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopeNames
↔ Set<
String> -
The scopes this session provides access to.
getter/setter pairoverride
- serverSideSessionId → UuidValue
-
Available on AuthSuccess, provided by the AuthSuccessServerSideSessionId extension
Returns the server side session token ID from the AuthSuccess.token.no setter - token ↔ String
-
The authentication token, in the case of JWT this is the access token.
getter/setter pairoverride
- tokenExpiresAt ↔ DateTime?
-
The token expiration date in UTC, if any.
getter/setter pairoverride
Methods
-
copyWith(
{String? authStrategy, String? token, Object? tokenExpiresAt = _Undefined, Object? refreshToken = _Undefined, UuidValue? authUserId, Set< String> ? scopeNames}) → CookieAuthSuccess -
Returns a shallow copy of this AuthSuccess
with some or all fields replaced by the given arguments.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a serialized JSON structure of the model which also includes
fields used by the database.
override
-
toJsonForProtocol(
) → Map< String, dynamic> -
Returns a JSON structure of the model, optimized for Protocol communication.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited