Skip to content

Commit b557161

Browse files
committed
create security/overview component
1 parent cd6fff1 commit b557161

File tree

7 files changed

+98
-3
lines changed

7 files changed

+98
-3
lines changed

src/app/security/overview/overview.component.css

Whitespace-only changes.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<div class="container pt-3">
2+
<div class="row">
3+
<div id="sidebar" style="width: 260px;">
4+
<app-sidebar></app-sidebar>
5+
</div>
6+
<div id="content" class="flex-grow-1" style="width: 400px;">
7+
<article>
8+
<h1>Overview</h1>
9+
<hr>
10+
<p>
11+
DevNet Web provides many security tools and libraries for building secure web applications and APIs, and these security features are:
12+
</p>
13+
<ul>
14+
<li>Cookie-based Authentication</li>
15+
<li>Token-based Authentication</li>
16+
<li>Policy-based Authorisation</li>
17+
<li>Role-based Authorisation</li>
18+
<li>Identity Manager</li>
19+
<li>CSRF Prevention</li>
20+
</ul>
21+
<br>
22+
<h3>Requirement</h3>
23+
<p>
24+
These security features are part of the DevNet Web package, and if it's not already installed on your system or project, you still can install it using the composer command line:
25+
</p>
26+
<pre><code class="language-shell">composer require devnet/web</code></pre>
27+
<p>
28+
Optionally, you may need the DevNet Entity ORM package if you want to use the Identity manager.
29+
</p>
30+
<pre><code class="language-shell">composer require devnet/entity</code></pre>
31+
</article>
32+
<nav class="no-print" aria-label="Page navigation">
33+
<ul class="nav-page">
34+
<li class="nav-page-item">
35+
<a class="nav-page-link" routerLink="/docs/entity/migrations">
36+
<i class="chevron left"></i> Previous
37+
</a>
38+
</li>
39+
<li class="nav-page-item">
40+
<a class="nav-page-link" routerLink="/docs/security/authentication">
41+
Next <i class="chevron right"></i>
42+
</a>
43+
</li>
44+
</ul>
45+
</nav>
46+
</div>
47+
</div>
48+
</div>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { OverviewComponent } from './overview.component';
4+
5+
describe('OverviewComponent', () => {
6+
let component: OverviewComponent;
7+
let fixture: ComponentFixture<OverviewComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [ OverviewComponent ]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(OverviewComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import hljs from 'highlight.js/lib/common';
3+
4+
@Component({
5+
selector: 'security-overview',
6+
templateUrl: './overview.component.html',
7+
styleUrls: ['./overview.component.css']
8+
})
9+
export class OverviewComponent implements OnInit {
10+
11+
constructor() { }
12+
13+
ngOnInit(): void {
14+
hljs.highlightAll();
15+
}
16+
17+
}

src/app/security/security-routing.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
3+
import { OverviewComponent } from './overview/overview.component';
34

4-
const routes: Routes = [];
5+
const routes: Routes = [
6+
{ path: 'docs/security/overview', component: OverviewComponent },
7+
{ path: 'docs/security', redirectTo: 'docs/security/overview', pathMatch: 'full' }
8+
];
59

610
@NgModule({
711
imports: [RouterModule.forChild(routes)],

src/app/security/security.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { SecurityRoutingModule } from './security-routing.module';
44
import { SharedModule } from '../shared/shared.module';
5+
import { OverviewComponent } from './overview/overview.component';
56

67
@NgModule({
7-
declarations: [],
8+
declarations: [
9+
OverviewComponent
10+
],
811
imports: [
912
CommonModule,
1013
SecurityRoutingModule,

src/app/shared/sidebar/sidebar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@
8282
<div class="collapse" id="security-collapse" data-bs-parent="#menu" routerLinkActive="show">
8383
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
8484
<li><a class="link-dark d-inline-flex text-decoration-none rounded" routerLink="/docs/security/overview" routerLinkActive="fw-bold">Overview</a></li>
85-
<li><a class="link-dark d-inline-flex text-decoration-none rounded" routerLink="/docs/security/antiforgery" routerLinkActive="fw-bold">Antiforgery</a></li>
8685
<li><a class="link-dark d-inline-flex text-decoration-none rounded" routerLink="/docs/security/authentication" routerLinkActive="fw-bold">Authentication</a></li>
8786
<li><a class="link-dark d-inline-flex text-decoration-none rounded" routerLink="/docs/security/authorisation" routerLinkActive="fw-bold">Authorisation</a></li>
8887
<li><a class="link-dark d-inline-flex text-decoration-none rounded" routerLink="/docs/security/identity" routerLinkActive="fw-bold">Identity Manager</a></li>
88+
<li><a class="link-dark d-inline-flex text-decoration-none rounded" routerLink="/docs/security/antiforgery" routerLinkActive="fw-bold">CSRF Prevention</a></li>
8989
</ul>
9090
</div>
9191
</li>

0 commit comments

Comments
 (0)