mirror of
https://github.com/revanced/revanced-api.git
synced 2025-04-29 22:24:31 +02:00
fix: Specify a validation function to fix authentication
This commit is contained in:
parent
8b17d8894d
commit
53c36002e9
@ -26,8 +26,9 @@ internal class AuthenticationService private constructor(
|
|||||||
fun AuthenticationConfig.jwt() {
|
fun AuthenticationConfig.jwt() {
|
||||||
jwt("jwt") {
|
jwt("jwt") {
|
||||||
realm = "ReVanced"
|
realm = "ReVanced"
|
||||||
|
|
||||||
verifier(JWT.require(Algorithm.HMAC256(jwtSecret)).withIssuer(issuer).build())
|
verifier(JWT.require(Algorithm.HMAC256(jwtSecret)).withIssuer(issuer).build())
|
||||||
|
// This is required and not optional. Authentication will fail if this is not present.
|
||||||
|
validate { JWTPrincipal(it.payload) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user