open-index/open-npm huggingface dataset:
npm package: @kreadyf/auth-angular
Description: | Angular| @kreadyf/auth-angular| | ------|:------:|  | >=9.0.0 <10.0.0 | v5.x | | >=8.0.0 <9.0.0  | v5.x |
Latest version: 6.2.0

# KDYF-AUTH-ANGULAR

## Versions

| Angular| @kreadyf/auth-angular|
| ------|:------:| 
| >=9.0.0 <10.0.0 | v5.x |
| >=8.0.0 <9.0.0  | v5.x |

## Getting started
### Step 1: Install `@kreadyf/auth-angular`:

#### NPM
```shell
npm install --save @kreadyf/auth-angular
```
#### YARN
```shell
yarn add @kreadyf/auth-angular
```
### Step 2: Configuration environment:
You have three options to login, you can use just one or all

```js
import {ProviderType} from '@kreadyf/auth-angular';

export const environment = {
  production: false,
  ...
  kdyfAuth: [
    {
      providerId: 'test1',
      providerType: ProviderType.AzureAd,
      authConfig: {
        loginUrl: 'https://my-server1/api/auth/'
      }
    },
    {
      providerId: 'test2',
      providerType: ProviderType.Eikon,
      authConfig: {
        loginUrl: 'https://my-server2/api/auth/'
      }
    },
    {
      providerId: 'test3',
      providerType: ProviderType.JwsSimple,
      authConfig: {
        loginUrl: 'https://my-server3/api/auth/'
      }
    }
  ]
};
```

### Step 3: Import AuthModule:
```js
import {AuthModule} from '@kreadyf/auth-angular';

@NgModule({
  declarations: [AppComponent],
  imports: [AuthModule.forRoot(environment.kdyfAuth)],
  bootstrap: [AppComponent]
})
export class AppModule {}
```

Basic login example:
```js
import {ProviderType} from '@kreadyf/auth-angular';
import * as authActions from '@kreadyf/auth-angular';
import {AuthActionTypes} from '@kreadyf/auth-angular';

    // Send data to login
    this.store.dispatch(
      new authActions.Login({
        credentials: {username: my-email, password: my-password},
        typeAuth: ProviderType.JwsSimple
    }));

    // Listen success login
    this.actions.pipe(
      filter(s => s.type === AuthActionTypes.AuthenticationSuccess),
      tap(() => ...)
    ).subscribe();

    // Listen failure login
    this.actions.pipe(
      filter(s => s.type === AuthActionTypes.AuthenticationFailure),
      tap(s => ...)
    ).subscribe();

```

## Contributing

Contributions are welcome.

## Inspiration
This component is inspired by KREADYF SRL
npm package: @kreadyf/auth-azure-ad-angular
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
Latest version: 3.3.1

# KdyfAuthAzureAdAngular

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.

## Code scaffolding

Run `ng generate component component-name --project kdyf-auth-azure-ad-angular` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project kdyf-auth-azure-ad-angular`.
> Note: Don't forget to add `--project kdyf-auth-azure-ad-angular` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build kdyf-auth-azure-ad-angular` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build kdyf-auth-azure-ad-angular`, go to the dist folder `cd dist/kdyf-auth-azure-ad-angular` and run `npm publish`.

## Running unit tests

Run `ng test kdyf-auth-azure-ad-angular` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).