Created
September 21, 2014 06:16
-
-
Save hasithaa/cbd445519cf953b56b27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.rampart; | |
import java.util.Map; | |
import org.apache.rampart.RampartConfigCallbackHandler; | |
import org.apache.rampart.policy.model.RampartConfig; | |
public class UTConfigCallbackHandler implements RampartConfigCallbackHandler{ | |
@Override | |
public void update(RampartConfig rampartConfig) { | |
Map<String, String> propertyMap = rampartConfig.getPropertyMap(); | |
if (propertyMap != null && propertyMap.containsKey("user_name")) { | |
System.out.println("Updating UT user name dynamically : " + propertyMap.get("user_name")); | |
rampartConfig.setUser(propertyMap.get("user_name")); | |
} | |
rampartConfig.setPwCbClass("org.example.rampart.PWCBHandler"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment