Package io.netty.handler.codec.quic
Class QuicTokenHandler.TokenValidationResult
- java.lang.Object
-
- io.netty.handler.codec.quic.QuicTokenHandler.TokenValidationResult
-
- Enclosing interface:
- QuicTokenHandler
public static final class QuicTokenHandler.TokenValidationResult extends Object
The result of a token validation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static QuicTokenHandler.TokenValidationResultinvalidToken()Returns a result that indicates the token is invalid.booleanisValid()Returnstrueif the token is valid.static QuicTokenHandler.TokenValidationResultodcidFromDestinationConnectionId()Returns a result that indicates the token is valid and the ODCID should be taken from the current destination connection id of the Initial packet.static QuicTokenHandler.TokenValidationResultodcidFromToken(int offset)Returns a result that indicates the token is valid and the ODCID should be taken from the token suffix starting at the specified offset.
-
-
-
Method Detail
-
invalidToken
public static QuicTokenHandler.TokenValidationResult invalidToken()
Returns a result that indicates the token is invalid.- Returns:
- the invalid token result.
-
odcidFromToken
public static QuicTokenHandler.TokenValidationResult odcidFromToken(int offset)
Returns a result that indicates the token is valid and the ODCID should be taken from the token suffix starting at the specified offset.This is typically used for tokens from Retry packets; see
QuicTokenHandler.validateToken(ByteBuf, InetSocketAddress, ByteBuf).- Parameters:
offset- the start index of the ODCID in the token.- Returns:
- the validation result.
-
odcidFromDestinationConnectionId
public static QuicTokenHandler.TokenValidationResult odcidFromDestinationConnectionId()
Returns a result that indicates the token is valid and the ODCID should be taken from the current destination connection id of the Initial packet.This is typically used for tokens from NEW_TOKEN frames; see
QuicTokenHandler.validateToken(ByteBuf, InetSocketAddress, ByteBuf).- Returns:
- the validation result.
-
isValid
public boolean isValid()
Returnstrueif the token is valid.- Returns:
trueif the token is valid.
-
-