Class IdpAdapterScriptHelper
- java.lang.Object
-
- com.sun.identity.saml2.plugins.scripted.IdpAdapterScriptHelper
-
@EvolvingAll @Singleton public class IdpAdapterScriptHelper extends Object
Provides helper functions for IDP Adapter Script Implementations.
-
-
Constructor Summary
Constructors Constructor Description IdpAdapterScriptHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ScriptEntitlementInfo>getEntitlements(String applicationName, String realm, Object sessionToken, AuthnRequest authnRequest)Retrieve aListofScriptEntitlementInfos.List<ScriptEntitlementInfo>getEntitlements(String applicationName, String realm, Subject subject, Set<String> resources)Retrieve aListofScriptEntitlementInfos.List<ScriptEntitlementInfo>getEntitlements(String applicationName, String realm, Subject subject, Set<String> resources, Map<String,Set<String>> environment)Retrieve aListofScriptEntitlementInfos.EvaluatorgetEvaluatorForSubject(String applicationName, Subject subject)StringgetIssuerName(AuthnRequest authnRequest)Retrieve the issuer name for the AuthN request.Set<String>getResourcesForToken(AuthnRequest authnRequest)Retrieve the issuer name from the AuthN request, within a Singleton Set.SubjectgetSubjectForToken(SSOToken sessionToken)SubjectgetSubjectForToken(Object sessionToken)
-
-
-
Method Detail
-
getIssuerName
public String getIssuerName(AuthnRequest authnRequest)
Retrieve the issuer name for the AuthN request.- Parameters:
authnRequest- the AuthN request- Returns:
- the issuer name
-
getResourcesForToken
public Set<String> getResourcesForToken(AuthnRequest authnRequest)
Retrieve the issuer name from the AuthN request, within a Singleton Set.- Parameters:
authnRequest- theAuthnRequest- Returns:
- the resources for the AuthN token
-
getSubjectForToken
public Subject getSubjectForToken(Object sessionToken)
- Parameters:
sessionToken- the SSO Token of type Object- Returns:
- the
Subjectassociated with the SSO Token
-
getEvaluatorForSubject
public Evaluator getEvaluatorForSubject(String applicationName, Subject subject)
-
getEntitlements
public List<ScriptEntitlementInfo> getEntitlements(String applicationName, String realm, Object sessionToken, AuthnRequest authnRequest) throws EntitlementException
Retrieve aListofScriptEntitlementInfos.- Parameters:
applicationName- the application namerealm- the realmsessionToken- the session tokenauthnRequest- theAuthnRequest- Returns:
- the
ListofScriptEntitlementInfos - Throws:
EntitlementException- if an error occurs when evaluating the entitlement information.
-
getEntitlements
public List<ScriptEntitlementInfo> getEntitlements(String applicationName, String realm, Subject subject, Set<String> resources) throws EntitlementException
Retrieve aListofScriptEntitlementInfos.- Parameters:
applicationName- the application name to retrieve the entitlement information forrealm- the realm to evaluatesubject- theSubjectto retrieve the entitlement information forresources- the Set of resources to evaluate- Returns:
- the
ListofScriptEntitlementInfos - Throws:
EntitlementException- if an error occurs when evaluating the entitlement information.
-
getEntitlements
public List<ScriptEntitlementInfo> getEntitlements(String applicationName, String realm, Subject subject, Set<String> resources, Map<String,Set<String>> environment) throws EntitlementException
Retrieve aListofScriptEntitlementInfos.- Parameters:
applicationName- the application name to retrieve the entitlement information forrealm- the realm to evaluatesubject- theSubjectto retrieve the entitlement information forresources- the Set of resources to evaluateenvironment- the environment parameters used in the evaluation- Returns:
- the
ListofScriptEntitlementInfos - Throws:
EntitlementException- if an error occurs when evaluating the entitlement information.
-
-