Skip to content

Conversation

rchavik
Copy link
Member

@rchavik rchavik commented May 14, 2020

No description provided.

@ADmad
Copy link
Member

ADmad commented May 14, 2020

The index page doesn't seem like the right place for this. It should under the "JWT" section on docs/en/authenticators.rst.

@rchavik
Copy link
Member Author

rchavik commented May 14, 2020

It's under Quick start, right after standard login example. I think it's a good place.

I'll move it anyway

JWT Token Generation
====================

To use JWT authentication, we need to generate keys::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To use JWT authentication, we need to generate keys::
By default the `JwtAuthenticator` uses `HS256` symmetric key algorithm and uses
the value of `Cake\Utility\Security::salt()` as encryption key.
For enhanced security one can instead use the `RS256` asymmetric key algorithm.
You can generate the required keys for that as follows::

$this->viewBuilder()->setOption('serialize', 'json');
}
Note that this requires setting up your `Applicaion` class as follows::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note that this requires setting up your `Applicaion` class as follows::
Note that this requires setting up your `Application` class as follows::

@rchavik rchavik closed this May 14, 2020
@rchavik
Copy link
Member Author

rchavik commented May 14, 2020

Obsoleted by #378

@rchavik rchavik deleted the rchavik-jwt-note branch May 14, 2020 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants