---
meta:
 - name: keywords
   description: api typescript node.js documentation OIDCRedisAdapter class
---
# OIDCRedisAdapter - @tsed/adapters-redis

## Usage

```typescript
import { OIDCRedisAdapter } from "@tsed/adapters-redis";
```

> See [/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.ts](https://github.com/tsedio/tsed/blob/v8.27.0/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.ts#L0-L0).

## Overview

```ts
class OIDCRedisAdapter<T extends AdapterModel> extends RedisAdapter<T> {
    protected configuration: Configuration;
    protected isGrantable: boolean;
    constructor(options: RedisAdapterConstructorOptions, connections: IORedis[], configuration: Configuration);
    onInsert(multi: ChainableCommander, payload: T, expiresIn: number): Promise<ChainableCommander>;
    findByUid(uid: string): Promise<"" | T | null | undefined>;
    findByUserCode(userCode: string): Promise<"" | T | null | undefined>;
    destroy(id: string): Promise<void>;
    revokeByGrantId(grantId: string): Promise<void>;
    consume(id: string): Promise<void>;
}
```

<!-- Members -->

## protected configuration

```ts
protected configuration: Configuration;
```

## protected isGrantable

```ts
protected isGrantable: boolean;
```

## onInsert

```ts
onInsert(multi: ChainableCommander, payload: T, expiresIn: number): Promise<ChainableCommander>;
```

## findByUid

```ts
findByUid(uid: string): Promise<"" | T | null | undefined>;
```

## findByUserCode

```ts
findByUserCode(userCode: string): Promise<"" | T | null | undefined>;
```

## destroy

```ts
destroy(id: string): Promise<void>;
```

## revokeByGrantId

```ts
revokeByGrantId(grantId: string): Promise<void>;
```

## consume

```ts
consume(id: string): Promise<void>;
```
