Skip to content

Commit c5c0f77

Browse files
committed
fix doc
1 parent fa32c28 commit c5c0f77

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

docs/token_authorization_api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Configuration
44
1. Enable token authorization by adding the provided plugin at start using the `--plugin-path` command.
5-
2. Torchserve will enable token authorization if the plugin is provided. In the current working directory a file `key_file.txt` will be generated.
5+
2. Torchserve will enable token authorization if the plugin is provided. In the current working directory a file `key_file.json` will be generated.
66
1. Example key file:
77

88
`Management Key: aadJv_R6 --- Expiration time: 2024-01-16T22:23:32.952499Z`

frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java

-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.security.KeyFactory;
2222
import java.security.KeyStore;
2323
import java.security.PrivateKey;
24-
import java.security.SecureRandom;
2524
import java.security.cert.Certificate;
2625
import java.security.cert.CertificateFactory;
2726
import java.security.cert.X509Certificate;
@@ -149,8 +148,6 @@ public final class ConfigManager {
149148
private boolean telemetryEnabled;
150149
private Logger logger = LoggerFactory.getLogger(ConfigManager.class);
151150

152-
private SecureRandom secureRandom = new SecureRandom();
153-
private Base64.Encoder baseEncoder = Base64.getUrlEncoder();
154151
private boolean tokenAuthorizationEnabled;
155152
private Class<?> tokenClass;
156153
private Object tokenObject;

0 commit comments

Comments
 (0)