Package com.artipie.conan
Class ItemTokenizer
java.lang.Object
com.artipie.conan.ItemTokenizer
Tokenize repository items via JWT tokens.
- Since:
- 0.1
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionItemTokenizer
(io.vertx.core.Vertx vertx) Create new instance with JWT support via vertx instance. -
Method Summary
Modifier and TypeMethodDescriptionauthenticateToken
(String token) Authenticate by token and decode item data.generateToken
(String path, String hostname) Generates string token for repository item info provided.
-
Constructor Details
-
ItemTokenizer
public ItemTokenizer(io.vertx.core.Vertx vertx) Create new instance with JWT support via vertx instance.- Parameters:
vertx
- Vertx core instance.
-
-
Method Details
-
generateToken
Generates string token for repository item info provided.- Parameters:
path
- Path value property of the repository item.hostname
- Host name property of the repository item.- Returns:
- Java String token in JWT format.
-
authenticateToken
Authenticate by token and decode item data.- Parameters:
token
- Item token string.- Returns:
- Decoded item data.
-