Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chapeaux/cpx-target

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chapeaux/cpx-target

Chapeaux Target Component

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

= Chapeaux User Component

== Events

  • user-ready - fires when the .user object data is populated
  • user-update - fires when the .user object is updated

== Usage

User data is always stored on the .user property once it is available.

=== Server-side or on-page

.Server-side Data inclusion example [source,html]

----

=== JSON Web Token

Requires that jwt_decode library be available globally.

Available component properties:

  • jwt-cookie: sets the cookie to parse for JWT data
  • jwt-token: sets the JWT token to parse for data

.JWT Cookie [source,html]

.JWT Token [source,html]

=== Keycloak

Requires keycloak.js to be available, and the following attributes to be set with the appropriate values:

  • kc-url - the Keycloak server url
  • kc-realm - the Keycloak realm
  • kc-client-id - the Keycloak client ID

Available component methods:

  • login(): log in using the Keycloak config
  • logout(): log out using the Keycloak config
  • register(): send user to registration screen based on Keycloak config
  • account(): send user to account management screen based on Keycloak config
  • token.createLoginUrl(): creates URL to direct user to login screen
  • token.createLogoutUrl(): creates URL to log user out

Available component properties:

  • token: the Keycloak object for authenticated users

.Keycloak [source,html]

=== Scripts

Keywords

FAQs

Package last updated on 11 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc