KEYCLOAK-14652 Align custom adapter example with documentation
This commit is contained in:
parent
78a1c6cf23
commit
098446b070
1 changed files with 9 additions and 4 deletions
|
@ -74,14 +74,19 @@ declare namespace Keycloak {
|
||||||
* ```ts
|
* ```ts
|
||||||
* import Keycloak, { KeycloakAdapter } from 'keycloak-js';
|
* import Keycloak, { KeycloakAdapter } from 'keycloak-js';
|
||||||
*
|
*
|
||||||
* class MyCustomAdapter implements KeycloakAdapter {
|
* // Implement the 'KeycloakAdapter' interface so that all required methods are guaranteed to be present.
|
||||||
* // Implement methods required by KeycloakAdapter here.
|
* const MyCustomAdapter: KeycloakAdapter = {
|
||||||
* }
|
* login(options) {
|
||||||
|
* // Write your own implementation here.
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* // The other methods go here...
|
||||||
|
* };
|
||||||
*
|
*
|
||||||
* const keycloak = new Keycloak();
|
* const keycloak = new Keycloak();
|
||||||
*
|
*
|
||||||
* keycloak.init({
|
* keycloak.init({
|
||||||
* adapter: MyCustomAdapter,
|
* adapter: MyCustomAdapter,
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue