SessionIdExtractable class final

Extracts a session identifier from a cookie.

The browser half of authentication. It rejects with 401 rather than the 400 a plain missing cookie would give, because an absent session is "you are not signed in", not "your request was malformed".

Implemented types

Constructors

SessionIdExtractable({String name = 'session'})
Reads the session id from the cookie named name.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The cookie holding the session id.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

extract(Request request) Future<Result<String, Rejection>>
Produces the value, or the rejection that stops the handler.
override
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