1.4.4 • Published 3 years ago

@dudadev/ms-client-auth v1.4.4

Weekly downloads
1,000
License
MIT
Repository
github
Last release
3 years ago

Microservices authentication client

Client to authenticate Duda's microservices' clients

Usage

import { create } from '@dudadev/ms-client-auth';

const auth = create();

function authListener(authDetails) {
	console.log(`Auth token: ${authDetails.value}`);
}

// Listen to auth changes
const cancelListener = auth.onAuth(authListener);
// Stop listening
cancelListener();

// Trigger authentication on demand
auth.authenticateServices()

// Set an interval to perform periodic authentication
auth.setAutoAuthInterval(5000); // This will cause the authenticator to authenticate every 5 seconds
// You can also create an auth instance with the interval
auth = create({ autoAuthInterval: 5000 });
1.4.4

3 years ago

1.4.3

3 years ago

1.4.1

4 years ago

1.3.1

4 years ago

1.3.0

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago