-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lazy Nina
committed
Oct 6, 2023
1 parent
00763db
commit d138d47
Showing
7 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
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,32 @@ | ||
<app-banner></app-banner> | ||
|
||
<div class="container"> | ||
<h3 class="text--neutral-white">Approve a JWT</h3> | ||
<div class="box--border box--rounded box--large"> | ||
<p class="padding-bottom--medium"> | ||
{{ globalVars.hostname }} wants to generate a JWT | ||
</p> | ||
<div> | ||
Public Key: <code>{{ publicKey }}</code> | ||
</div> | ||
<div> | ||
Expiration Days: <code>{{ expirationDays }}</code> | ||
</div> | ||
<div class="margin-top--large"> | ||
<button | ||
type="button" | ||
class="button--primary button--medium margin-bottom--medium" | ||
(click)="onSubmit()" | ||
> | ||
Allow | ||
</button> | ||
<!-- <button--> | ||
<!-- type="button"--> | ||
<!-- class="button--primary--outline button--medium"--> | ||
<!-- (click)="onCancel()"--> | ||
<!-- >--> | ||
<!-- Deny--> | ||
<!-- </button>--> | ||
</div> | ||
</div> | ||
</div> |
Empty file.
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,24 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { JwtApproveComponent } from './jwt-approve.component'; | ||
|
||
describe('JwtApproveComponent', () => { | ||
let component: JwtApproveComponent; | ||
let fixture: ComponentFixture<JwtApproveComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [JwtApproveComponent], | ||
}).compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(JwtApproveComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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,34 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
import { GlobalVarsService } from '../global-vars.service'; | ||
import { IdentityService } from '../identity.service'; | ||
|
||
@Component({ | ||
selector: 'app-jwt-approve', | ||
templateUrl: './jwt-approve.component.html', | ||
styleUrls: ['./jwt-approve.component.scss'], | ||
}) | ||
export class JwtApproveComponent implements OnInit { | ||
publicKey: any; | ||
expirationDays = 30; | ||
|
||
constructor( | ||
private activatedRoute: ActivatedRoute, | ||
private identityService: IdentityService, | ||
public globalVars: GlobalVarsService | ||
) {} | ||
|
||
ngOnInit(): void { | ||
this.activatedRoute.queryParams.subscribe((params) => { | ||
this.publicKey = params.publicKey; | ||
this.expirationDays = Number(params.expirationDays) || 30; | ||
}); | ||
} | ||
|
||
onSubmit(): void { | ||
this.identityService.jwt({ | ||
publicKey: this.publicKey, | ||
expirationDays: this.expirationDays, | ||
}); | ||
} | ||
} |