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 aList
ofScriptEntitlementInfo
s.List<ScriptEntitlementInfo>
getEntitlements(String applicationName, String realm, Subject subject, Set<String> resources)
Retrieve aList
ofScriptEntitlementInfo
s.List<ScriptEntitlementInfo>
getEntitlements(String applicationName, String realm, Subject subject, Set<String> resources, Map<String,Set<String>> environment)
Retrieve aList
ofScriptEntitlementInfo
s.Evaluator
getEvaluatorForSubject(String applicationName, Subject subject)
String
getIssuerName(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.Subject
getSubjectForToken(SSOToken sessionToken)
Subject
getSubjectForToken(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
Subject
associated 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 aList
ofScriptEntitlementInfo
s.- Parameters:
applicationName
- the application namerealm
- the realmsessionToken
- the session tokenauthnRequest
- theAuthnRequest
- Returns:
- the
List
ofScriptEntitlementInfo
s - 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 aList
ofScriptEntitlementInfo
s.- Parameters:
applicationName
- the application name to retrieve the entitlement information forrealm
- the realm to evaluatesubject
- theSubject
to retrieve the entitlement information forresources
- the Set of resources to evaluate- Returns:
- the
List
ofScriptEntitlementInfo
s - 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 aList
ofScriptEntitlementInfo
s.- Parameters:
applicationName
- the application name to retrieve the entitlement information forrealm
- the realm to evaluatesubject
- theSubject
to retrieve the entitlement information forresources
- the Set of resources to evaluateenvironment
- the environment parameters used in the evaluation- Returns:
- the
List
ofScriptEntitlementInfo
s - Throws:
EntitlementException
- if an error occurs when evaluating the entitlement information.
-
-