// Parse the AttributeStatements
List<AttributeStatementBean> attrBeanList = null;
if (attributeStatementProviders != null && attributeStatementProviders.size() > 0) {
attrBeanList = new ArrayList<AttributeStatementBean>();
for (AttributeStatementProvider statementProvider : attributeStatementProviders) {
AttributeStatementBean statementBean = statementProvider.getStatement(tokenParameters);
if (statementBean != null) {
LOG.fine(
"AttributeStatements" + statementBean.toString()
+ "returned by AttributeStatementProvider "
+ statementProvider.getClass().getName()
);
attrBeanList.add(statementBean);
}
}
}
// Parse the AuthenticationStatements
List<AuthenticationStatementBean> authBeanList = null;
if (authenticationStatementProviders != null && authenticationStatementProviders.size() > 0) {
authBeanList = new ArrayList<AuthenticationStatementBean>();
for (AuthenticationStatementProvider statementProvider : authenticationStatementProviders) {
AuthenticationStatementBean statementBean =
statementProvider.getStatement(tokenParameters);
if (statementBean != null) {
LOG.fine(
"AuthenticationStatement" + statementBean.toString()
+ "returned by AuthenticationStatementProvider "
+ statementProvider.getClass().getName()
);
authBeanList.add(statementBean);
}
}
}
// Parse the AuthDecisionStatements
List<AuthDecisionStatementBean> authDecisionBeanList = null;
if (authDecisionStatementProviders != null
&& authDecisionStatementProviders.size() > 0) {
authDecisionBeanList = new ArrayList<AuthDecisionStatementBean>();
for (AuthDecisionStatementProvider statementProvider
: authDecisionStatementProviders) {
AuthDecisionStatementBean statementBean =
statementProvider.getStatement(tokenParameters);
if (statementBean != null) {
LOG.fine(
"AuthDecisionStatement" + statementBean.toString()
+ "returned by AuthDecisionStatementProvider "
+ statementProvider.getClass().getName()
);
authDecisionBeanList.add(statementBean);
}
}
}
// If no providers have been configured, then default to the ClaimsAttributeStatementProvider
// If no Claims are available then use the DefaultAttributeStatementProvider
if ((attributeStatementProviders == null || attributeStatementProviders.isEmpty())
&& (authenticationStatementProviders == null || authenticationStatementProviders.isEmpty())
&& (authDecisionStatementProviders == null || authDecisionStatementProviders.isEmpty())) {
attrBeanList = new ArrayList<AttributeStatementBean>();
AttributeStatementProvider attributeProvider = new ClaimsAttributeStatementProvider();
AttributeStatementBean attributeBean = attributeProvider.getStatement(tokenParameters);
if (attributeBean != null) {
attrBeanList.add(attributeBean);
} else {
attributeProvider = new DefaultAttributeStatementProvider();
attributeBean = attributeProvider.getStatement(tokenParameters);