Skip to content

Commit

Permalink
docs: add new signal properties to public api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed May 20, 2024
1 parent d753406 commit a07ec6b
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 a07ec6b

Please sign in to comment.