Package org.forgerock.openam.agent
Class TokenRestrictionResolver
- java.lang.Object
-
- org.forgerock.openam.agent.TokenRestrictionResolver
-
public class TokenRestrictionResolver extends Object
Class to validate agents sending AuthN requests and the resource being accessed, and return the token restriction.
-
-
Constructor Summary
Constructors Constructor Description TokenRestrictionResolver(AMIdentityRepositoryFactory identityRepositoryFactory, TokenRestrictionFactory tokenRestrictionFactory)Constructor ofLDAPAgentValidatorinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenRestrictionresolve(String agentId, String realm, SSOToken adminToken)Returns an appropriate token restriction for the given agent.TokenRestrictionresolve(String providerId, String gotoUrl, SSOToken adminToken, boolean uniqueSSOTokenCookie)Returns an appropriate token restriction for the given agent.
-
-
-
Constructor Detail
-
TokenRestrictionResolver
@Inject public TokenRestrictionResolver(AMIdentityRepositoryFactory identityRepositoryFactory, TokenRestrictionFactory tokenRestrictionFactory)
Constructor ofLDAPAgentValidatorinstances.- Parameters:
identityRepositoryFactory- Factory for creatingAMIdentityRepositoryinstances.tokenRestrictionFactory- Factory for creatingTokenRestrictioninstances.
-
-
Method Detail
-
resolve
public TokenRestriction resolve(String agentId, String realm, SSOToken adminToken) throws IdRepoException, SMSException, SSOException
Returns an appropriate token restriction for the given agent.- Parameters:
agentId- The id of the agent.realm- The realm.adminToken- The admin token.- Returns:
- The
TokenRestriction. - Throws:
IdRepoException- if the agent's attributes cannot be retrieved.SMSException- if a token restriction cannot be created.SSOException- if any of the inputs are invalid.
-
resolve
public TokenRestriction resolve(String providerId, String gotoUrl, SSOToken adminToken, boolean uniqueSSOTokenCookie) throws IdRepoException, SMSException, SSOException
Returns an appropriate token restriction for the given agent.- Parameters:
providerId- The request's provider id attribute.gotoUrl- The goto url attribute.adminToken- The admin token.uniqueSSOTokenCookie-trueif unique SSO token cookie is enabled;falseotherwise.- Returns:
- The
TokenRestriction. - Throws:
IdRepoException- if the agent's attributes cannot be retrieved.SMSException- if a token restriction cannot be created.SSOException- if any of the inputs are invalid.
-
-