Skip to main content

refresh

Function refresh 

Source
pub async fn refresh(cx: &Cx) -> Result<Option<Session>>
Expand description

Extends the current session’s lifetime without changing its token.

Re-issues the presented token with a full lifetime ahead of it, implementing sliding expiration. Returns the session with its new expiry so the application can update its record, or None when the request carried no session.

§Errors

Returns an error when the token store fails to read or re-issue the token.