| Package | Description | 
|---|---|
| org.waarp.gateway.kernel.rest | |
| org.waarp.gateway.kernel.rest.client | 
 Package for REST Http client support 
 | 
| org.waarp.openr66.protocol.http.restv2.resthandlers | 
 This package regroups all the general purpose Netty  
ChannelHandlers
 of the REST API. | 
| Modifier and Type | Method and Description | 
|---|---|
HmacSha256 | 
RestConfiguration.getHmacSha256()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
RestArgument.checkBaseAuthent(HmacSha256 hmacSha256,
                String extraKey,
                long maxInterval)
This implementation of authentication is as follow: if X_AUTH is included
 in the URI or Header 
0) Check that timestamp is correct (|curtime - timestamp| < maxinterval) from ARG_X_AUTH_TIMESTAMP, if maxInterval is 0, not mandatory 1) Get all URI args (except ARG_X_AUTH_KEY itself, but including timestamp), lowered case, in alphabetic order 2) Add an extra Key if not null (from ARG_X_AUTH_INTERNALKEY) 3) Compute an hash (SHA-1 or SHA-256) 4) Compare this hash with ARG_X_AUTH_KEY  | 
protected static String | 
RestArgument.computeKey(HmacSha256 hmacSha256,
          String extraKey,
          TreeMap<String,String> treeMap,
          String argPath)  | 
static String[] | 
RestArgument.getBaseAuthent(HmacSha256 hmacSha256,
              io.netty.handler.codec.http.QueryStringEncoder encoder,
              String user,
              String extraKey)
The encoder is completed with extra necessary URI part containing
 ARG_X_AUTH_TIMESTAMP & ARG_X_AUTH_KEY 
 | 
void | 
RestConfiguration.setHmacSha256(HmacSha256 hmacSha256)  | 
| Modifier and Type | Method and Description | 
|---|---|
RestFuture | 
HttpRestClientHelper.sendQuery(HmacSha256 hmacSha256,
         io.netty.channel.Channel channel,
         io.netty.handler.codec.http.HttpMethod method,
         String host,
         String addedUri,
         String user,
         String pwd,
         Map<String,String> uriArgs,
         String json)
Send an HTTP query using the channel for target, using signature 
 | 
| Constructor and Description | 
|---|
RestHandlerHook(boolean authenticated,
               HmacSha256 hmac,
               long delay)
Creates a HandlerHook which will check for authentication and signature
 on incoming request depending on
 the parameters. 
 | 
RestSignatureHandler(HmacSha256 hmac)
Initializes the handler with the given HMAC key. 
 | 
Copyright © 2009–2020 Waarp. All rights reserved.