0.0.25 • Published 1 year ago

cyberuskey-widget v0.0.25

Weekly downloads
14
License
MIT
Repository
github
Last release
1 year ago

What is Cyberus Key?

Your users will never need to remember or input a password again with Cyberus Key, our one-touch universal, user authentication system.

Now you can guarantee your customers the highest level of protection against phishing attacks, identity and data theft,and more. By removing the risk of stolen passwords or credentials, you can eliminate one of the biggest cyber security threats..

Cyberus Key Widget

Cyberus Key Widget is a button that help you to integrate with Cyberus Key Authentication Server. After clicking the button an OpenID's authentication proccess will be started.

How to install?

With NPM:

npm install cyberuskey-widget

With Yarn:

yarn add cyberuskey-widget

You can also get a minified file from JSDelivr's CDN (replace the VERSION with the version you want to):

<script src="https://cdn.jsdelivr.net/npm/cyberuskey-widget@{VERSION}/dist/widget.min.js" type="text/javascript"></script>

<script type="text/javascript">
  var CyberusKeyWidgetNamespace = window['cyberuskey-widget'];
  var CyberusKeyWidget = CyberusKeyWidgetNamespace.CyberusKeyWidget;

  new CyberusKeyWidget(/* ... */);
</script>

And then you can embed the button on your web page:

import { CyberusKeyWidget, HTML5GeoProvider } from "cyberuskey-widget";

$(document).ready(() => {
const ckButton = new CyberusKeyWidget({
  clientId: window.CyberusKey.CLIENT_ID,
  redirectUri: window.CyberusKey.REDIRECT_URI,
  fullOpenIdLogin: true,
  state: window.CyberusKey.STATE,
  nonce: window.CyberusKey.NONCE
});

cyberusKeyButton.create('cyberus-key-widget-container');
});

If fullOpenIdLogin is true, then a user will be redirected to cyberuskey.com to process the login. This is the recommended configuration. If it’s false, the login process is done only on your side and you will have to e.g. handle errors.

Documentation

Widget uses Cyberus Key JavaScript SDK, here you have the documentation.

Classes

WidgetOptions

Kind: global class

new WidgetOptions()

WidgetOptions.theme : string

Kind: static property of WidgetOptions

WidgetOptions.serverUrl : string

Kind: static property of WidgetOptions

WidgetOptions.animation : WidgetAnimation

Kind: static property of WidgetOptions

WidgetOptions.geoProvider : GeoProvider

Kind: static property of WidgetOptions

WidgetOptions.state : string

Kind: static property of WidgetOptions

WidgetOptions.nonce : string

Kind: static property of WidgetOptions

WidgetOptions.responseType : string

Kind: static property of WidgetOptions

WidgetOptions.autoplay : boolean

Kind: static property of WidgetOptions

WidgetOptions.instructionAsDialog : boolean

Kind: static property of WidgetOptions

WidgetOptions.fullOpenIdLogin : boolean

Kind: static property of WidgetOptions

CyberusKeyWidget

Kind: global class

new CyberusKeyWidget()

$(document).ready(() => { const ckButton = new CyberusKeyWidget({ clientId: window.CyberusKey.CLIENT_ID, redirectUri: window.CyberusKey.REDIRECT_URI, fullOpenIdLogin: true, state: window.CyberusKey.STATE, nonce: window.CyberusKey.NONCE });

cyberusKeyButton.create('cyberus-key-widget-container'); });

If fullOpenIdLogin is true, then a user will be redirected to cyberuskey.com to process the login. This is the recommended configuration. If it’s false, the login process is done only on your side and you will have to e.g. handle errors.

cyberusKeyWidget.create(containingElementClassName)

Kind: instance method of CyberusKeyWidget

ParamTypeDescription
containingElementClassNamestringCSS class name of the containing DOM element for the Cyberus Key Widget.

CyberusKeyWidget.CyberusKeyWidget

Kind: static class of CyberusKeyWidget

new CyberusKeyWidget(options)

ParamType
optionsWidgetOptions

WidgetAnimation : enum

Kind: global enum
Read only: true

Links

CyberusKey JavaScript SDK docs: https://github.com/CyberusLabs/cyberuskey-sdk/

License

MIT © Cyberus Labs sp. z o.o.

0.0.25

1 year ago

0.0.24

1 year ago

0.0.22

1 year ago

0.0.23

1 year ago

0.0.21

1 year ago

0.0.20

3 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.1

5 years ago