Skip to content

Commit

Permalink
README FILES
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitturner committed Mar 3, 2021
1 parent 1deb74d commit abf2ec2
Show file tree
Hide file tree
Showing 5 changed files with 14,021 additions and 16 deletions.
29 changes: 29 additions & 0 deletions ORBIT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* === 🌌 WELCOME TO ORBIT CODE SPACESHIP 🌌 ===
*
* Project :
* By :
*
* ██████╗ ██████╗ ██████╗ ██╗████████╗ ████████╗██╗ ██╗██████╗ ███╗ ██╗███████╗██████╗
* ██╔═══██╗██╔══██╗██╔══██╗██║╚══██╔══╝ ╚══██╔══╝██║ ██║██╔══██╗████╗ ██║██╔════╝██╔══██╗
* ██║ ██║██████╔╝██████╔╝██║ ██║ ██║ ██║ ██║██████╔╝██╔██╗ ██║█████╗ ██████╔╝
* ██║ ██║██╔══██╗██╔══██╗██║ ██║ ██║ ██║ ██║██╔══██╗██║╚██╗██║██╔══╝ ██╔══██╗
* ╚██████╔╝██║ ██║██████╔╝██║ ██║ ██║ ╚██████╔╝██║ ██║██║ ╚████║███████╗██║ ██║
* ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝
*
* AUTHOR : MOHAMED GUEYE [Orbit Turner] - Linkedin: www.linkedin.com/in/orbitturner - Email: [email protected]
* GITHUB : Orbit Turner - Website: http://orbitturner.com/
*🔻===============================================================================================🔻
* Project Name-------------->: ORBIT JWT HELPER
* Project Description------->: This is a Helper library made for handling JWTs in Angular Web Apps.
* Project Version----------->: 2.0.2
* Project Developer--------->: @OrbitTurner : https://orbitturner.com
* Project Main Language----->: TYPESCRIPT - ANGULAR
* Project Start Date-------->: 04/01/2021
* Project Type-------------->: Web Application / SAAS
* Project License----------->: 💚 GNU ✔ ITS FREE and OPEN just credit me.
* Project Inspired From----->: ANGULAR-2 - JWT
* Project Repository-------->: https://github.com/orbitturner/orbit-jwt
*🔻===============================================================================================🔻
* ❤ 🔹 💚 ENJOY IT 💚 - 💚 SHARE IT 💚 - 💚 USE IT💚 🔹 ❤
*/

30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

**orbit-jwt** is a helper library for working with [JWTs](http://jwt.io/introduction) in your Angular applications.


<p align="center">
<a href="http://orbitturner.com/"><img src="https://raw.githubusercontent.com/orbitturner/ORBIT_SUGAR_CODES/master/assets/ORBIT-JWT-ANNOUNCEMENT-1024.png" width="auto" alt="Orbit-JWT COVER"/></a>
</p>


##Contents
Expand Down Expand Up @@ -60,10 +62,10 @@ This library does not have any functionality for (or opinion about) implementing

```bash
# installation with npm
npm install @auth0/angular-jwt
npm install orbit-jwt

# installation with yarn
yarn add @auth0/angular-jwt
yarn add orbit-jwt
```

**This library relies on the URL interface which is not supported in IE11.**
Expand All @@ -79,7 +81,7 @@ injectable features, you can simply create an instance of the utility and use it
directly:

```ts
import { JwtHelperService } from "@auth0/angular-jwt";
import { JwtHelperService } from "orbit-jwt";

const helper = new JwtHelperService();

Expand All @@ -95,7 +97,7 @@ Import the `JwtModule` module and add it to your imports list. Call the `forRoot
Be sure to import the `HttpClientModule` as well.

```ts
import { JwtModule } from "@auth0/angular-jwt";
import { JwtModule } from "orbit-jwt";
import { HttpClientModule } from "@angular/common/http";

export function tokenGetter() {
Expand Down Expand Up @@ -183,7 +185,7 @@ List any domains you wish to allow authenticated requests to be sent to by speci
JwtModule.forRoot({
config: {
// ...
allowedDomains: ["localhost:3001", "foo.com", "bar.com"],
allowedDomains: ["localhost:4200", "orbit.com", "exemple.com"],
},
});
```
Expand All @@ -199,10 +201,10 @@ JwtModule.forRoot({
config: {
// ...
disallowedRoutes: [
"http://localhost:3001/auth/",
"https://foo.com/bar/",
"http://localhost:4200/auth/",
"https://exemple.com/bar/",
"//foo.com/bar/baz",
/localhost:3001\/foo\/far.*/,
/localhost:4200\/foo\/far.*/,
], // strings and regular expressions
},
});
Expand Down Expand Up @@ -310,7 +312,7 @@ Import the `JWT_OPTIONS` `InjectionToken` so that you can instruct it to use you
Create a factory function and specify the options as you normally would if you were using `JwtModule.forRoot` directly. If you need to use a service in the function, list it as a parameter in the function and pass it in the `deps` array when you provide the function.

```ts
import { JwtModule, JWT_OPTIONS } from '@auth0/angular-jwt';
import { JwtModule, JWT_OPTIONS } from 'orbit-jwt';
import { TokenService } from './app.tokenservice';

// ...
Expand Down Expand Up @@ -348,7 +350,7 @@ export function jwtOptionsFactory(tokenService) {
The custom factory function approach described above can be used to get a token asynchronously with Ionic's `Storage`.

```ts
import { JwtModule, JWT_OPTIONS } from '@auth0/angular-jwt';
import { JwtModule, JWT_OPTIONS } from 'orbit-jwt';
import { Storage } from '@ionic/storage';

export function jwtOptionsFactory(storage) {
Expand Down Expand Up @@ -387,7 +389,7 @@ This service contains helper functions:
## isTokenExpired (old tokenNotExpired function)

```
import { JwtHelperService } from '@auth0/angular-jwt';
import { JwtHelperService } from 'orbit-jwt';
// ...
constructor(public jwtHelper: JwtHelperService) {}
Expand All @@ -399,7 +401,7 @@ console.log(this.jwtHelper.isTokenExpired()); // true or false
## getTokenExpirationDate

```
import { JwtHelperService } from '@auth0/angular-jwt';
import { JwtHelperService } from 'orbit-jwt';
// ...
constructor(public jwtHelper: JwtHelperService) {}
Expand All @@ -411,7 +413,7 @@ console.log(this.jwtHelper.getTokenExpirationDate()); // date
## decodeToken

```
import { JwtHelperService } from '@auth0/angular-jwt';
import { JwtHelperService } from 'orbit-jwt';
// ...
constructor(public jwtHelper: JwtHelperService) {}
Expand Down
2 changes: 1 addition & 1 deletion core/orbit-jwt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orbit-jwt",
"version": "2.0.2",
"version": "2.0.3",
"description": "This is a Helper library made for handling JWTs in Angular Web Apps.",
"private": false,
"repository": {
Expand Down
Loading

0 comments on commit abf2ec2

Please sign in to comment.