我为Oracle Access Manager开发了一个身份验证插件
简而言之,它包含:
类
以下XML
我正在尝试从XML文件中动态获取
<Value>
an 的标记 。<Attribute>
<Plugin type="Authentication">
<author>Phill</author>
<email>phill@example.com</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>
类
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;
}
重要的提示:
该context对象是AuthenticationContext包含有关插件信息的实例
根据 Oracle 的文档,这是某人检索的确切方式Attribute,但我总是得到NullPointerException
还有其他方法可以检索吗<Value>?
qq_遁去的一_1
人到中年有点甜
相关分类