class UserSessions

Methods

__construct(string $authProvider, string $userId, CanManageUserSessions $handler, Store $store)

Create a new user session repository.

all()

Get the active sessions for the user.

bool
invalidate(string $sessionId)

Invalidate an active session belonging to the user.

int
invalidateOthers(string $except)

Invalidate every other active session belonging to the user.

int
invalidateAll()

Invalidate every active session belonging to the user.

int
invalidateMany(string|null $except = null)

Invalidate active sessions while preserving an optional session identifier.

void
rotateCurrentSession()

Rotate the current session after its stored record was destroyed.

Details

at line 15
__construct(string $authProvider, string $userId, CanManageUserSessions $handler, Store $store)

Create a new user session repository.

Parameters

string $authProvider
string $userId
CanManageUserSessions $handler
Store $store

at line 28
Collection all()

Get the active sessions for the user.

Return Value

Collection

at line 36
bool invalidate(string $sessionId)

Invalidate an active session belonging to the user.

Parameters

string $sessionId

Return Value

bool

at line 60
int invalidateOthers(string $except)

Invalidate every other active session belonging to the user.

Parameters

string $except

Return Value

int

at line 70
int invalidateAll()

Invalidate every active session belonging to the user.

Return Value

int

at line 78
protected int invalidateMany(string|null $except = null)

Invalidate active sessions while preserving an optional session identifier.

Parameters

string|null $except

Return Value

int

at line 112
protected void rotateCurrentSession()

Rotate the current session after its stored record was destroyed.

Return Value

void