-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jwt enhacer to remove undesire char (#36)
* Added JWT Enhancer * Moke code compatible * Added jwt package in service and move jwt services in that package
- Loading branch information
Showing
5 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/com/hrv/mart/apigatewayadmin/config/jwt/JwtAuthenticationManager.kt
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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/com/hrv/mart/apigatewayadmin/controller/AuthController.kt
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
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/com/hrv/mart/apigatewayadmin/service/jwt/JWTEnhancer.kt
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,10 @@ | ||
package com.hrv.mart.apigatewayadmin.service.jwt | ||
|
||
class JWTEnhancer { | ||
|
||
companion object { | ||
private const val specialCharCode= 34 | ||
fun enhanceJWT(jwt: String) = | ||
jwt.replace(specialCharCode.toChar().toString(), "") | ||
} | ||
} |
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