DescopeSession constructor
DescopeSession(
- DescopeToken sessionToken,
- DescopeToken refreshToken,
- DescopeUser user
Creates a new DescopeSession object from tokens.
Implementation
factory DescopeSession(DescopeToken sessionToken, DescopeToken refreshToken, DescopeUser user) {
// for web only - refresh token might be available via cookie only
if (sessionToken.jwt == refreshToken.jwt) {
refreshToken = WebRefreshToken(sessionToken);
}
return DescopeSession._internal(sessionToken, refreshToken, user);
}