@advanced-rest-client/auth-dialogsdeprecated

Common authorization dialogs to provide client credentials

Usage no npm install needed!

<script type="module">
  import advancedRestClientAuthDialogs from 'https://cdn.skypack.dev/@advanced-rest-client/auth-dialogs';
</script>

README

Published on NPM

Build Status

Published on webcomponents.org

<auth-dialogs>

Authorization dialogs to provide client credentials for Basic and NTLM authorization schemes. Used primarily in Advanced REST Client.

Usage

Installation

npm install --save @advanced-rest-client/auth-dialogs

In a LitElement

import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/auth-dialogs/auth-dialogs.js';

class SampleElement extends LitElement {
  render() {
    return html`
    <auth-dialog-basic @auth-dialog-closed="${this.onAuthData}"></auth-dialog-basic>
    <auth-dialog-ntlm @auth-dialog-closed="${this.onAuthData}"></auth-dialog-ntlm>
    `;
  }

  onAuthData(e) {
    if (!e.detail.cancelled) {
      console.log(e.detail.value);
    }
  }

  connectedCallback() {
    super.connectedCallback();
    const basic = this.shadowRoot.querySelector('auth-dialog-basic');
    basic.opened = true;
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/advanced-rest-client/auth-dialogs
cd auth-dialogs
npm install

Running the demo locally

npm start

Running the tests

npm test

API components

This components is a part of API components ecosystem