public class RestSignatureHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
Constructor and Description |
---|
RestSignatureHandler(HmacSha256 hmac)
Initializes the handler with the given HMAC key.
|
Modifier and Type | Method and Description |
---|---|
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest request)
Checks if the request given as parameter by the channel pipeline is
properly signed or not.
|
acceptInboundMessage, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public RestSignatureHandler(HmacSha256 hmac)
hmac
- The REST HMAC signing key.protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest request)
AbstractRestDbHandler
, otherwise
a reply is directly sent stating that the request needs to be signed. If
an unexpected error occurs during
the execution, an error 500 HTTP status is sent instead.channelRead0
in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
ctx
- The context of the Netty channel handler.request
- The original HTTP request.Copyright © 2009–2020 Waarp. All rights reserved.