File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 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>
88</ p >
99
1010< 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 >
1414 < option > ES256</ option >
1515 </ select >
1616
17- < p class ="font-grey algo "> {{"generate-token.data" | transloco}}</ p >
17+ < p class ="font-grey algo "> {{"generate-token.data" | transloco}}</ p >
1818
1919 < textarea [(ngModel)] ="payloadValue " name ="payload " class ="rectangle-1 data1 "> </ textarea >
2020
@@ -32,7 +32,7 @@ <h1 class="mb-5 heading">{{ "generate-token.create" | transloco }}</h1>
3232
3333 < div class ="row ">
3434 < 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 >
3636 </ div >
3737 </ div >
3838</ form >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { StepService } from '../shared/services/step.service';
1111export class GenerateTokenComponent implements OnInit {
1212
1313 payloadValue = '{ "data" : "We raised series A" }'
14+ algo = "RS256"
1415
1516 @Input ( ) token = ""
1617
@@ -24,18 +25,19 @@ export class GenerateTokenComponent implements OnInit {
2425 }
2526
2627 onCreateToken ( postData : { algo : string , payload : string } ) {
28+ console . log ( "Creating token for: " + JSON . stringify ( postData ) ) ;
2729 this . jwtService . post ( postData ) . subscribe ( {
2830 next : ( success : any ) => {
2931 this . token = success . token
30- localStorage . setItem ( 'token' , this . token )
32+ localStorage . setItem ( 'token' , this . token ) ;
33+ this . nextStep ( ) ;
3134 } , error : ( error : any ) => {
3235 console . error ( 'error:' , error ) ;
3336 } ,
3437 } )
3538 }
3639
3740 nextStep ( ) {
38- this . onCreateToken
3941 this . stepService . setStep ( 5 )
4042 this . router . navigate ( [ 'generate-token1' ] )
4143 }
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ <h1 class="mb-5 heading">{{ "jwtusedfor.usedFor" | transloco }}</h1>
3434 < img src ="assets/images/icon-crog.svg " class ="me-2 " />
3535 {{ "jwtusedfor.leverage3" | transloco }}
3636 < br >
37- {{"jwtusedfor.leverage4" | transloco}}
37+ <!--{{"jwtusedfor.leverage4" | transloco}}-->
38+ <!--Include a drawing here to make it easier to understand-->
3839</ p >
3940
4041< p class ="font-grey "> {{"jwtusedfor.introduction3" | transloco}}</ p >
You can’t perform that action at this time.
0 commit comments