# Auth sessions resource

Canonical page: https://docs.ovok.com/flutter-sdk/reference/ovok_sdk/auth-sessions-resource

{/* Generated by scripts/generate_reference.dart; do not edit. */}

## AuthSessionsResource [#authsessionsresource]

```dart
class AuthSessionsResource
```

The account's sessions on the server. Reached through `ovok.auth.sessions`.

### Constructors [#constructors]

#### AuthSessionsResource.new [#authsessionsresourcenew]

```dart
AuthSessionsResource(HttpClient _http, UserSession _session)
```

Built by `AuthResource`; use `ovok.auth.sessions` instead.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `_http` | `HttpClient` | positional |  |
| `_session` | `UserSession` | positional |  |

### Methods [#methods]

#### AuthSessionsResource.list [#authsessionsresourcelist]

```dart
Future<List<dynamic>> list()
```

Lists the account's sessions. Calls `GET auth/session`.

Returns `Future<List<dynamic>>`.

#### AuthSessionsResource.revoke [#authsessionsresourcerevoke]

```dart
Future<void> revoke(String option)
```

Revokes sessions. Calls `DELETE auth/session/{option}`.

`option` is `current`, `other`, `all` or a session id; revoking `current` also ends it here.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `option` | `String` | positional |  |

Returns `Future<void>`.
