angular-aap-auth
ng-ebi-authorization.
This library is deprecated. Please, useThe angular-aap-auth is a simple authentication Angular library that relies on EBI's Authentication and Authorization Profile (AAP) infrastructure. After successful login, a JWT token is stored on the browser (via cookie, local or session storage).
Installation
To install this library, run:
npm install --save angular-aap-auth @auth0/angular-jwt
or
yarn add angular-aap-auth @auth0/angular-jwt
Compatibility table
Angular version | angular-aap-auth version |
---|---|
>=5 <6 | <=1.0.0-alpha.7 |
>=6 <7 | >=1.0.0-alpha.8 |
Consuming the library
In your Angular AppModule
(app.module.ts):
;; ;; ;
The default configuration uses localStorage to save the JWT token under the key 'id_token'. See Advance usage for a more fine grained configuration.
Example use on a component:
;; ;
Alternative approach:
;;; ;
Advance usage
Advance module configuration:
;; ;;; // Optional
Example on how to get specific claims:
;;; ;
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing.
License
Apache 2.0 © EMBL - European Bioinformatics Institute