Skip to content

Commit

Permalink
Merge pull request #1944 from timdeschryver/docs/signals
Browse files Browse the repository at this point in the history
docs: add new signal properties to public api docs
  • Loading branch information
FabianGosebrink authored May 20, 2024
2 parents d753406 + a07ec6b commit 602b667
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,21 @@ this.userData$ = this.oidcSecurityService.userData$;
}
```

## userData

A signal implementation of `userData$`.
The `userData` signal returns a `Signal<UserDataResult>`.

### Example

```ts
userData = this.oidcSecurityService.userData;

console.log(this.userData().userData);
console.log(this.userData().userData?.name);
console.log(this.userData().allUserData);
```

## isAuthenticated$

The `isAuthenticated$` property returns an `Observable<AuthenticatedResult>`. This object is filled depending on with how many configurations you run. The `AuthenticatedResult` is structured as follows:
Expand Down Expand Up @@ -148,6 +163,20 @@ this.isAuthenticated$ = this.oidcSecurityService.isAuthenticated$;
}
```

## authenticated

A signal implementation of `isAuthenticated$`.
The `authenticated` signal returns a `Signal<AuthenticatedResult>`.

### Example

```ts
authenticated = this.oidcSecurityService.authenticated;

console.log(authenticated().isAuthenticated);
console.log(authenticated().allConfigsAuthenticated);
```

## isLoading$

> The property is disabled and will be removed in future versions. Please use the `PublicEventsService` with the events `EventTypes.CheckingAuth`, `EventTypes.CheckingAuthFinished`, `EventTypes.CheckingAuthFinishedWithError` instead
Expand Down

0 comments on commit 602b667

Please sign in to comment.