Interface WarlockTicketService
-
- All Implemented Interfaces:
public interface WarlockTicketService- Since:
2022-11-05
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classWarlockTicketService.Passpublic interfaceWarlockTicketService.Termpublic classWarlockTicketService.SimpleTerm
-
Method Summary
Modifier and Type Method Description abstract WarlockTicketService.Termdecode(String token)abstract Stringencode(@NotNull() WarlockTicketService.Term term, @NotNull() Duration ttl)abstract WarlockTicketService.PassfindPass(@NotNull() String clientId)Find Pass Info by ClientId, null if not exist abstract intnextSeq(long uid, int type)Get the next serial number under the user by type abstract voidrevokeAll(long uid)revoke the code and token under the user longcalcDue(@NotNull() Duration ttl)Calculate the expired timestamp booleancheckSeq(long uid, int type, int seq)Whether the serial number is valid. -
-
Method Detail
-
decode
@Nullable() abstract WarlockTicketService.Term decode(String token)
-
encode
@NotNull() abstract String encode(@NotNull() WarlockTicketService.Term term, @NotNull() Duration ttl)
-
findPass
@Nullable() abstract WarlockTicketService.Pass findPass(@NotNull() String clientId)
Find Pass Info by ClientId, null if not exist
-
nextSeq
abstract int nextSeq(long uid, int type)
Get the next serial number under the user by type
-
revokeAll
abstract void revokeAll(long uid)
revoke the code and token under the user
-
calcDue
long calcDue(@NotNull() Duration ttl)
Calculate the expired timestamp
- Parameters:
ttl- time to live
-
checkSeq
boolean checkSeq(long uid, int type, int seq)
Whether the serial number is valid.
-
-
-
-