File tree 3 files changed +11
-8
lines changed
3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ <h1 class="mb-5 heading">{{ "generate-token.create" | transloco }}</h1>
8
8
</ p >
9
9
10
10
< form #postForm ="ngForm " (ngSubmit) ="onCreateToken(postForm.value) ">
11
- < select ngModel name ="algo " class ="rectangle ">
12
- < option selected > HS256</ option >
13
- < option > RS256</ option >
11
+ < select [( ngModel)] =" algo " name ="algo " class ="rectangle ">
12
+ < option > HS256</ option >
13
+ < option [selected] =" true " > RS256</ option >
14
14
< option > ES256</ option >
15
15
</ select >
16
16
17
- < p class ="font-grey algo "> {{"generate-token.data" | transloco}}</ p >
17
+ < p class ="font-grey algo "> {{"generate-token.data" | transloco}}</ p >
18
18
19
19
< textarea [(ngModel)] ="payloadValue " name ="payload " class ="rectangle-1 data1 "> </ textarea >
20
20
@@ -32,7 +32,7 @@ <h1 class="mb-5 heading">{{ "generate-token.create" | transloco }}</h1>
32
32
33
33
< div class ="row ">
34
34
< div class ="col-auto text-end ">
35
- < button type ="submit " (click) =" nextStep() " class ="btn btn-warning mt-5 " innerHTML ="{{ 'generate-token.generateToken' | transloco }} "> </ button >
35
+ < button type ="submit " class ="btn btn-warning mt-5 " innerHTML ="{{ 'generate-token.generateToken' | transloco }} "> </ button >
36
36
</ div >
37
37
</ div >
38
38
</ form >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { StepService } from '../shared/services/step.service';
11
11
export class GenerateTokenComponent implements OnInit {
12
12
13
13
payloadValue = '{ "data" : "We raised series A" }'
14
+ algo = "RS256"
14
15
15
16
@Input ( ) token = ""
16
17
@@ -24,18 +25,19 @@ export class GenerateTokenComponent implements OnInit {
24
25
}
25
26
26
27
onCreateToken ( postData : { algo : string , payload : string } ) {
28
+ console . log ( "Creating token for: " + JSON . stringify ( postData ) ) ;
27
29
this . jwtService . post ( postData ) . subscribe ( {
28
30
next : ( success : any ) => {
29
31
this . token = success . token
30
- localStorage . setItem ( 'token' , this . token )
32
+ localStorage . setItem ( 'token' , this . token ) ;
33
+ this . nextStep ( ) ;
31
34
} , error : ( error : any ) => {
32
35
console . error ( 'error:' , error ) ;
33
36
} ,
34
37
} )
35
38
}
36
39
37
40
nextStep ( ) {
38
- this . onCreateToken
39
41
this . stepService . setStep ( 5 )
40
42
this . router . navigate ( [ 'generate-token1' ] )
41
43
}
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ <h1 class="mb-5 heading">{{ "jwtusedfor.usedFor" | transloco }}</h1>
34
34
< img src ="assets/images/icon-crog.svg " class ="me-2 " />
35
35
{{ "jwtusedfor.leverage3" | transloco }}
36
36
< br >
37
- {{"jwtusedfor.leverage4" | transloco}}
37
+ <!--{{"jwtusedfor.leverage4" | transloco}}-->
38
+ <!--Include a drawing here to make it easier to understand-->
38
39
</ p >
39
40
40
41
< p class ="font-grey "> {{"jwtusedfor.introduction3" | transloco}}</ p >
You can’t perform that action at this time.
0 commit comments