I have developed an Authentication Plugin for Oracle Access Manager
Briefly it contains:
- java.class
- the following XML
I'm trying to Dynamically get the
<Value>tag of an<Attribute>from the XML file.
<Plugin type="Authentication">
<author>Phill</author>
<email>[email protected]</email>
<creationDate>12:47:00, 2019-07-11</creationDate>
<description>Phill-Plugin</description>
<configuration>
<AttributeValuePair>
<Attribute type="string" length="60">GenerateUrl</Attribute>
<mandatory>true</mandatory>
<instanceOverride>false</instanceOverride>
<globalUIOverride>true</globalUIOverride>
<value>This is the value i'm trying to retrieve</value>
</AttributeValuePair>
</configuration>
</Plugin>
java.class
try {
CredentialParam tem = context.getCredential().getParam("GenerateUrl");
String temp = (String) tem.getValue();
System.out.println("TEST: " + temp);
generateUrl = temp + "The User" + user;
} catch (Exception e) {
System.out.println("\n\n\n-------------------\n");
System.out.println("- Input Is: -\n");
System.out.println("- "+e+" -\n");
System.out.println("-------------------\n");
generateUrl = "A URL" + "The User" + user;
}
Important Note:
The
contextobject is anAuthenticationContextinstance containing information about the Plug-in
Based on Oracle's Documentation, this is the exact way someone retrieves an Attribute but i'm always getting a NullPointerException
Is there any other way that i can retrieve the <Value>?
GenerateUrland with the method above i should get the contents of the<value>tag<Attribute type="string" length="60" name="GenerateUrl" id="GenerateUrl">GenerateUrl</Attribute>and i'm still getting aNullPointerException