Skip to content

Commit

Permalink
Merge pull request #15 from corbado/14-readme-fixes
Browse files Browse the repository at this point in the history
#14: README fixes
  • Loading branch information
corbadoman authored Jun 27, 2023
2 parents 500a92c + e9750f6 commit 3cac77d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ $corbado = new Corbado\SDK($config);

The Corbado SDK provides a range of services including:

- `AuthToken`
- `AuthTokens`
- `EmailLinks`
- `Session`
- `Sessions`
- `SMSCodes`
- `Validation`
- `WebAuthn`
Expand All @@ -49,20 +49,20 @@ The Corbado SDK provides a range of services including:
To use a specific service, such as Session, invoke it as shown below:

```PHP
$corbado->session->getCurrentUser();
$corbado->sessions()->getCurrentUser();
```

### Corbado session management

Corbado offers an efficient and secure session management system (refer to
the [documentation](https://docs.corbado.com/overview/welcome) for more details).
the [documentation](https://docs.corbado.com/sessions/overview) for more details).

To validate a user after authentication, call `getCurrentUser()` which returns a user object with
all information about the current user. This object contains the current authentication state as well as user's id,
name, email and phone number.

```PHP
$user = $corbado->session->getCurrentUser();
$user = $corbado->sessions()->getCurrentUser();
if ($user->isAuthenticated()) {
// Do anything with authenticated user
} else {
Expand Down

0 comments on commit 3cac77d

Please sign in to comment.