-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(arc-docs):auth module. documentation
- Loading branch information
Showing
7 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
projects/arc-docs/src/app/docs/auth-doc/auth-doc-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {NgModule} from '@angular/core'; | ||
import {RouterModule, Routes} from '@angular/router'; | ||
import {DocIntrodutionComponent} from './components/doc-introdution/doc-introdution.component'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
redirectTo: 'authDocIntro', | ||
pathMatch: 'full', | ||
}, | ||
{ | ||
path: 'authDocIntro', | ||
component: DocIntrodutionComponent, | ||
}, | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule], | ||
}) | ||
export class AuthDocRoutingModule {} |
19 changes: 19 additions & 0 deletions
19
projects/arc-docs/src/app/docs/auth-doc/auth-doc.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {NgModule} from '@angular/core'; | ||
import {CommonModule} from '@angular/common'; | ||
|
||
import {AuthDocRoutingModule} from './auth-doc-routing.module'; | ||
import {DocIntrodutionComponent} from './components/doc-introdution/doc-introdution.component'; | ||
import {CliWrapperComponent} from '@project-lib/components/cli-wrapper/cli-wrapper.component'; | ||
import {ThemeModule} from '@project-lib/theme/theme.module'; | ||
|
||
@NgModule({ | ||
declarations: [DocIntrodutionComponent], | ||
|
||
imports: [ | ||
CommonModule, | ||
AuthDocRoutingModule, | ||
ThemeModule, | ||
CliWrapperComponent, | ||
], | ||
}) | ||
export class AuthDocModule {} |
66 changes: 66 additions & 0 deletions
66
.../arc-docs/src/app/docs/auth-doc/components/doc-introdution/doc-introdution.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<div class="intro-wrapper"> | ||
<div class="1st-phase"> | ||
<nb-card> | ||
<nb-card-header fixed> | ||
<h2 class="nb-card-header-title">Auth Module</h2> | ||
</nb-card-header> | ||
<nb-card-body> | ||
<p> | ||
The main goal of the Auth module is to provide a pluggable set of | ||
components and services for easier setup of the authentication layer | ||
for Angular applications. The module separates the UI part | ||
(login/register/etc components) from the business logic with the help | ||
of the authentication | ||
</p> | ||
<div class="note"> | ||
<p>NOTE:</p> | ||
<a | ||
href="https://github.com/sourcefuse/loopback4-microservice-catalog/tree/master/services/authentication-service" | ||
>The setup still requires communication with backend services. | ||
</a> | ||
</div> | ||
</nb-card-body> | ||
</nb-card> | ||
|
||
<nb-card> | ||
<nb-card-header fixed> | ||
<h2 class="nb-card-header-title">Authentication UI components</h2> | ||
</nb-card-header> | ||
<nb-card-body> | ||
<ul> | ||
<li>Login</li> | ||
<li>Sign Up</li> | ||
<li>Forget Password</li> | ||
<li>Reset Password</li> | ||
</ul> | ||
<p>You can use the built-in components</p> | ||
</nb-card-body> | ||
</nb-card> | ||
|
||
<nb-card> | ||
<nb-card-header fixed> | ||
<h2 class="nb-card-header-title">Auth Strategies</h2> | ||
</nb-card-header> | ||
<nb-card-body> | ||
<div class="note" *ngFor="let list of strategyList"> | ||
{{ list.Data }} | ||
</div> | ||
</nb-card-body> | ||
</nb-card> | ||
|
||
<nb-card> | ||
<nb-card-header fixed> | ||
<h2 class="nb-card-header-title">Helping services</h2> | ||
</nb-card-header> | ||
<nb-card-body> | ||
<ul> | ||
<div> | ||
<li *ngFor="let data of helpingData"> | ||
<p>{{ data.list }}</p> | ||
</li> | ||
</div> | ||
</ul> | ||
</nb-card-body> | ||
</nb-card> | ||
</div> | ||
</div> |
15 changes: 15 additions & 0 deletions
15
.../arc-docs/src/app/docs/auth-doc/components/doc-introdution/doc-introdution.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.note { | ||
background-color: #e0f7fa; | ||
border-left: 4px solid #036ea3; | ||
padding: 16px; | ||
margin: 16px 0; | ||
|
||
} | ||
a { | ||
text-decoration: none; | ||
color: #19a5ff; | ||
} | ||
|
||
a:hover { | ||
text-decoration: underline; | ||
} |
22 changes: 22 additions & 0 deletions
22
...c-docs/src/app/docs/auth-doc/components/doc-introdution/doc-introdution.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {ComponentFixture, TestBed} from '@angular/core/testing'; | ||
|
||
import {DocIntrodutionComponent} from './doc-introdution.component'; | ||
|
||
describe('DocIntrodutionComponent', () => { | ||
let component: DocIntrodutionComponent; | ||
let fixture: ComponentFixture<DocIntrodutionComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [DocIntrodutionComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(DocIntrodutionComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
44 changes: 44 additions & 0 deletions
44
...ts/arc-docs/src/app/docs/auth-doc/components/doc-introdution/doc-introdution.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-doc-introdution', | ||
templateUrl: './doc-introdution.component.html', | ||
styleUrls: ['./doc-introdution.component.scss'], | ||
}) | ||
export class DocIntrodutionComponent { | ||
strategyList: object[] = [ | ||
{ | ||
Data: ' AuthService: Describes how to handle login and logout with Authentication.', | ||
}, | ||
{ | ||
Data: 'AuthGuard: Explains how to protect routes based on the users authentication state.', | ||
}, | ||
{ | ||
Data: 'AppComponent: Shows how to manage user state and provide login/logout functionality in the UI.', | ||
}, | ||
{ | ||
Data: ' AppRoutingModule: Demonstrates how to configure routes and apply authentication guards.', | ||
}, | ||
]; | ||
|
||
helpingData: object[] = [ | ||
{ | ||
list: `AuthService: AuthService is a service that handles all authentication-related operations | ||
in an Angular application . It provides methods for logging in and signing up users | ||
using various authentication strategies, managing the current users authentication state, and handling logout.`, | ||
}, | ||
{ | ||
list: `AuthGaurd: AuthGuard is a route guard in Angular that prevents unauthorized access to certain routes in your application. | ||
It checks if a user is authenticated before allowing access to a route, ensuring that only | ||
authenticated users can access protected routes.`, | ||
}, | ||
{ | ||
list: `SessionStoreService: SessionStoreService is an Angular service that provides a simple API for interacting with the browser's | ||
session storage. It allows you to store, retrieve, and remove data that persists for the duration of the page session.`, | ||
}, | ||
{ | ||
list: `ApiService: ApiService is an Angular service that provides a simple API for interacting with a backend server. | ||
It handles HTTP requests and responses, making it easy to perform CRUD (Create, Read, Update, Delete) operations.`, | ||
}, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters