/** * @see IdentityTrustManager#isTrusted() */ public TrustDecision isTrusted(SecurityContext securityContext) { if(securityContext == null) throw new IllegalArgumentException("Security Context is null"); if(this.identityTrustContext == null) this.identityTrustContext = new JBossIdentityTrustContext(securityDomain, securityContext); TrustDecision td = TrustDecision.NotApplicable; if(this.identityTrustContext == null) throw new IllegalStateException("IdentityTrustContext is null"); try { td = this.identityTrustContext.isTrusted(); } catch (IdentityTrustException e) { log.trace("Trust Exception:",e); } return td; }
/** * @see IdentityTrustManager#isTrusted(org.jboss.security.SecurityContext) */ public TrustDecision isTrusted(SecurityContext securityContext) { if(securityContext == null) throw PicketBoxMessages.MESSAGES.invalidNullArgument("securityContext"); if(this.identityTrustContext == null) this.identityTrustContext = new JBossIdentityTrustContext(securityDomain, securityContext); TrustDecision td = TrustDecision.NotApplicable; if(this.identityTrustContext == null) throw PicketBoxMessages.MESSAGES.invalidNullProperty("identityTrustContext"); try { td = this.identityTrustContext.isTrusted(); } catch (IdentityTrustException e) { PicketBoxLogger.LOGGER.debugIgnoredException(e); } return td; }