diff options
author | Vitaly Takmazov | 2023-01-18 13:03:48 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-18 13:03:48 +0300 |
commit | a0b7a0f2a5ad8637545fa6d68c46822e90e117e5 (patch) | |
tree | 1b464d9eb601f66c1c4e3d088b2cc0e9d9cd597e /src/main/java/com/juick/KeystoreManager.java | |
parent | a56652bdd65a9987231e890f46e85e482c8d2f7f (diff) |
Cleanup unused code
Diffstat (limited to 'src/main/java/com/juick/KeystoreManager.java')
-rw-r--r-- | src/main/java/com/juick/KeystoreManager.java | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/main/java/com/juick/KeystoreManager.java b/src/main/java/com/juick/KeystoreManager.java index da52411f..e00d99e8 100644 --- a/src/main/java/com/juick/KeystoreManager.java +++ b/src/main/java/com/juick/KeystoreManager.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2020, Juick + * Copyright (C) 2008-2023, Juick * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,9 +17,7 @@ package com.juick; -import com.juick.model.User; import com.juick.www.api.activity.model.objects.Actor; -import io.jsonwebtoken.Jwts; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.Resource; @@ -32,9 +30,6 @@ import java.io.InputStream; import java.security.*; import java.security.cert.Certificate; import java.security.cert.CertificateException; -import java.time.ZonedDateTime; -import java.util.Arrays; -import java.util.Date; public class KeystoreManager { private static final Logger logger = LoggerFactory.getLogger("ActivityPub"); @@ -82,11 +77,4 @@ public class KeystoreManager { String pubkeyPem = person.getPublicKey().getPublicKeyPem(); return Keys.decode(pubkeyPem.getBytes()).getKey(); } - public String generateToken(User user) { - return Jwts.builder() - .setSubject(user.getName()) - .setIssuedAt(Date.from(ZonedDateTime.now().toInstant())) - .signWith(getPrivateKey()) - .compact(); - } } |