summaryrefslogtreecommitdiffstats
path: root/src/auth/jwt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/auth/jwt.rs')
-rw-r--r--src/auth/jwt.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/auth/jwt.rs b/src/auth/jwt.rs
index 0d7b593..f44b7d4 100644
--- a/src/auth/jwt.rs
+++ b/src/auth/jwt.rs
@@ -4,19 +4,19 @@ use serde::{de::DeserializeOwned, Serialize};
use super::Error;
-pub static JWT: Lazy<Jwt> = Lazy::new(|| {
+pub static JWT: Lazy<JwtTranscoder> = Lazy::new(|| {
let secret = std::env::var("JWT_SECRET").expect("JWT_SECRET must be set");
- Jwt::new(secret.as_bytes())
+ JwtTranscoder::new(secret.as_bytes())
});
-pub struct Jwt {
+pub struct JwtTranscoder {
encoding: EncodingKey,
decoding: DecodingKey,
header: jsonwebtoken::Header,
validation: jsonwebtoken::Validation,
}
-impl Jwt {
+impl JwtTranscoder {
fn new(secret: &[u8]) -> Self {
Self {
encoding: EncodingKey::from_secret(secret),