@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { //TODO: Need some way to get a reference to the keystore service and the encryption key in particular. Template currUrl = context.getCurrentUrl(); Builder newUrl = new Builder( currUrl ); Map<String,Query> map = newUrl.getQuery(); Query query = map.remove( ENCRYPTED_PARAMETER_NAME ); UrlRewriteStepStatus status = UrlRewriteStepStatus.FAILURE; status = getUrlRewriteStepStatus(context, newUrl, map, query, status); return status; }
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { //TODO: Need some way to get a reference to the keystore service and the encryption key in particular. Template currUrl = context.getCurrentUrl(); Builder newUrl = new Builder( currUrl ); Map<String,Query> map = newUrl.getQuery(); Query query = map.remove( ENCRYPTED_PARAMETER_NAME ); UrlRewriteStepStatus status = UrlRewriteStepStatus.FAILURE; status = getUrlRewriteStepStatus(context, newUrl, map, query, status); return status; }
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { //TODO: Need some way to get a reference to the keystore service and the encryption key in particular. Template url = context.getCurrentUrl(); String str = url.toString(); String path = str; String query = null; int index = str.indexOf( '?' ); if( index >= 0 ) { path = str.substring( 0, index ); if( index < str.length() ) { query = str.substring( index + 1 ); } } if( query != null ) { query = Base64.encodeBase64String( query.getBytes( StandardCharsets.UTF_8 ) ); query = removeTrailingEquals( query ); url = Parser.parseLiteral( path + "?" + ENCODED_PARAMETER_NAME +"=" + query ); context.setCurrentUrl( url ); } return UrlRewriteStepStatus.SUCCESS; }
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { //TODO: Need some way to get a reference to the keystore service and the encryption key in particular. Template url = context.getCurrentUrl(); String str = url.toString(); String path = str; String query = null; int index = str.indexOf( '?' ); if( index >= 0 ) { path = str.substring( 0, index ); if( index < str.length() ) { query = str.substring( index + 1 ); } } if( query != null ) { query = Base64.encodeBase64String( query.getBytes( StandardCharsets.UTF_8 ) ); query = removeTrailingEquals( query ); url = Parser.parseLiteral( path + "?" + ENCODED_PARAMETER_NAME +"=" + query ); context.setCurrentUrl( url ); } return UrlRewriteStepStatus.SUCCESS; }
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { //TODO: Need some way to get a reference to the keystore service and the encryption key in particular. Template url = context.getCurrentUrl(); String str = url.toString(); String path = str; String query = null; int index = str.indexOf( '?' ); if( index >= 0 ) { path = str.substring( 0, index ); if( index < str.length() ) { query = str.substring( index + 1 ); } } if( query != null ) { query = encode( query ); url = Parser.parseLiteral( path + "?" + ENCRYPTED_PARAMETER_NAME +"=" + query ); context.setCurrentUrl( url ); } return UrlRewriteStepStatus.SUCCESS; }
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { //TODO: Need some way to get a reference to the keystore service and the encryption key in particular. Template url = context.getCurrentUrl(); String str = url.toString(); String path = str; String query = null; int index = str.indexOf( '?' ); if( index >= 0 ) { path = str.substring( 0, index ); if( index < str.length() ) { query = str.substring( index + 1 ); } } if( query != null ) { query = encode( query ); url = Parser.parseLiteral( path + "?" + ENCRYPTED_PARAMETER_NAME +"=" + query ); context.setCurrentUrl( url ); } return UrlRewriteStepStatus.SUCCESS; }
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { UrlRewriteStepStatus status = UrlRewriteStepStatus.SUCCESS; if( matcher != null ) { status = UrlRewriteStepStatus.FAILURE; Matcher.Match match = matcher.match( context.getCurrentUrl() ); if( match != null ) { context.addParameters( match.getParams() ); status = UrlRewriteStepStatus.SUCCESS; } } return status; }
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { UrlRewriteStepStatus status = UrlRewriteStepStatus.SUCCESS; if( matcher != null ) { status = UrlRewriteStepStatus.FAILURE; Matcher.Match match = matcher.match( context.getCurrentUrl() ); if( match != null ) { context.addParameters( match.getParams() ); status = UrlRewriteStepStatus.SUCCESS; } } return status; }
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { Template currUrl = context.getCurrentUrl(); Builder newUrl = new Builder( currUrl ); Map<String,Query> map = newUrl.getQuery();
@Override public UrlRewriteStepStatus process( UrlRewriteContext context ) throws Exception { Template currUrl = context.getCurrentUrl(); Builder newUrl = new Builder( currUrl ); Map<String,Query> map = newUrl.getQuery();
UrlRewriteStepStatus stepStatus = stepHolder.process( context ); if( UrlRewriteStepStatus.SUCCESS == stepStatus ) { outputUri = context.getCurrentUrl(); if( ruleName == null ) { LOG.rewroteUrlViaImplicitRule( inputUri, direction, effectiveRuleName, outputUri );
UrlRewriteStepStatus stepStatus = stepHolder.process( context ); if( UrlRewriteStepStatus.SUCCESS == stepStatus ) { outputUri = context.getCurrentUrl(); if( ruleName == null ) { LOG.rewroteUrlViaImplicitRule( inputUri, direction, effectiveRuleName, outputUri );