/** * {@inheritDoc} */ @Override public Set<Credential> extract(WebServiceContext source) { Set<Credential> credentials = new HashSet<Credential>(); if (source != null) { Principal userPrincipal = source.getUserPrincipal(); if (userPrincipal != null) { credentials.add(new PrincipalCredential(userPrincipal, true)); } } return credentials; }
private boolean isClientAuthenticationProvided(SecurityContext securityContext) { Set<PrincipalCredential> creds = securityContext.getCredentials(PrincipalCredential.class); for (PrincipalCredential cred : creds) { if (cred.getPrincipal() != null && cred.isTrusted()) { return true; } } return false; }
/** * {@inheritDoc} */ @Override public Set<Credential> extract(WebServiceContext source) { Set<Credential> credentials = new HashSet<Credential>(); if (source != null) { Principal userPrincipal = source.getUserPrincipal(); if (userPrincipal != null) { credentials.add(new PrincipalCredential(userPrincipal, true)); } } return credentials; }
private boolean isClientAuthenticationProvided(SecurityContext securityContext) { Set<PrincipalCredential> creds = securityContext.getCredentials(PrincipalCredential.class); for (PrincipalCredential cred : creds) { if (cred.getPrincipal() != null && cred.isTrusted()) { return true; } } return false; }
/** * {@inheritDoc} */ @Override public Set<Credential> extract(SSLSession source) { Set<Credential> credentials = new HashSet<Credential>(); try { credentials.add(new ConfidentialityCredential(source.isValid())); credentials.add(new PrincipalCredential(source.getPeerPrincipal())); credentials.add(new CertificateCredential(source.getPeerCertificates()[0])); } catch (SSLPeerUnverifiedException e) { throw BaseSecurityMessages.MESSAGES.unableToExtractCredentials(e.getMessage(), e); } return credentials; }
/** * {@inheritDoc} */ @Override public Set<Credential> extract(SSLSession source) { Set<Credential> credentials = new HashSet<Credential>(); try { credentials.add(new ConfidentialityCredential(source.isValid())); credentials.add(new PrincipalCredential(source.getPeerPrincipal())); credentials.add(new CertificateCredential(source.getPeerCertificates()[0])); } catch (SSLPeerUnverifiedException e) { throw BaseSecurityMessages.MESSAGES.unableToExtractCredentials(e.getMessage(), e); } return credentials; }
credentials.add(new PrincipalCredential(_principal, true));
Principal userPrincipal = request.getUserPrincipal(); if (userPrincipal != null) { credentials.add(new PrincipalCredential(userPrincipal, true)); credentials.add(new PrincipalCredential(new UserPrincipal(remoteUser), true));
credentials.add(new PrincipalCredential(_principal, true));
Principal userPrincipal = request.getUserPrincipal(); if (userPrincipal != null) { credentials.add(new PrincipalCredential(userPrincipal, true)); credentials.add(new PrincipalCredential(new UserPrincipal(remoteUser), true));
credentials.add(new PrincipalCredential(principal, true));
credentials.add(new PrincipalCredential(principal, true));