private SamlIdentityProviderConfig resolveIdpConfig(Issuer issuer) { final String value = issuer.getValue(); if (value != null) { final SamlIdentityProviderConfig config = idpConfigs.get(value); if (config != null) { return config; } } throw new SamlException("failed to find identity provider from configuration " + issuer.getValue()); }
private SamlIdentityProviderConfig validateAndGetIdPConfig(LogoutRequest logoutRequest, String endpointUri) { final String issuer = logoutRequest.getIssuer().getValue(); if (issuer == null) { throw new SamlException("no issuer found from the logout request: " + logoutRequest.getID()); } if (!endpointUri.equals(logoutRequest.getDestination())) { throw new SamlException("unexpected destination: " + logoutRequest.getDestination()); } final SamlIdentityProviderConfig config = idpConfigs.get(issuer); if (config == null) { throw new SamlException("unexpected identity provider: " + issuer); } return config; }
final String idpEntityId = issuer.getValue(); config = idpConfigs.get(idpEntityId); if (config == null) {
if (issuer == null || issuer.getValue() == null) { throw new SamlException("failed to get an Issuer element from the assertion");
private SamlIdentityProviderConfig resolveIdpConfig(Issuer issuer) { final String value = issuer.getValue(); if (value != null) { final SamlIdentityProviderConfig config = idpConfigs.get(value); if (config != null) { return config; } } throw new SamlException("failed to find identity provider from configuration " + issuer.getValue()); }
/** * Gets issuer from saml response. * * @param response the response * @return the issuer from saml response */ private static String getIssuerFromSamlResponse(final StatusResponseType response) { return response.getIssuer().getValue(); }
private String[] getAuditResourceFromSamlLogoutRequest(final LogoutRequest returnValue) { val result = new ToStringBuilder(this, ToStringStyle.NO_CLASS_NAME_STYLE) .append("issuer", returnValue.getIssuer().getValue()) .toString(); return new String[]{result}; }
/** * Gets issuer from saml request. * * @param request the request * @return the issuer from saml request */ private static String getIssuerFromSamlRequest(final RequestAbstractType request) { return request.getIssuer().getValue(); }
private String[] getPrincipalIdFromSamlResponse(final Response response) { val result = new ToStringBuilder(this, ToStringStyle.NO_CLASS_NAME_STYLE) .append("issuer", response.getIssuer().getValue()) .append("destination", response.getDestination()) .toString(); return new String[]{result}; }
private String[] getAuditResourceFromSamlAuthnRequest(final AuthnRequest returnValue) { val result = new ToStringBuilder(this, ToStringStyle.NO_CLASS_NAME_STYLE) .append("issuer", returnValue.getIssuer().getValue()) .append("binding", returnValue.getProtocolBinding()) .toString(); return new String[]{result}; } }
/** * This method is used to get issuer from full qualified issuer value * @param request Assertion query request * @return String issuer value */ private String getIssuer(RequestAbstractType request) { String fullQualifiedIssuer = request.getIssuer().getValue(); return MultitenantUtils.getTenantAwareUsername(fullQualifiedIssuer); }
/** {@inheritDoc} */ @Override @Nullable public String apply(@Nullable final ProfileRequestContext profileRequestContext) { final RequestAbstractType request = requestLookupStrategy.apply(profileRequestContext); if (request != null && request.getIssuer() != null) { final Issuer issuer = request.getIssuer(); if (issuer.getFormat() == null || NameID.ENTITY.equals(issuer.getFormat())) { return issuer.getValue(); } } return null; }
/** * This method is used to get tenant domain from full qualified issuer value * @param request Assertion request message * @return String tenant domain value */ protected String getTenantDomain(RequestAbstractType request) { String fullQualifiedIssuer = request.getIssuer().getValue(); return MultitenantUtils.getTenantDomain(fullQualifiedIssuer); }
/** * This method is used to get tenant domain from full qualified issuer * @param request Assertion query request * @return String tenant domain value */ private String getTenantDomain(RequestAbstractType request) { String fullQualifiedIssuer = request.getIssuer().getValue(); return MultitenantUtils.getTenantDomain(fullQualifiedIssuer); }
private String getIssuer(SamlAssertionWrapper assertionW) { Issuer samlIssuer = assertionW.getSaml2().getIssuer(); return samlIssuer == null ? null : samlIssuer.getValue(); }
/** * This method is used to get issuer name from full qualified issuer value * @param request Assertion request message * @return String issuer name */ protected String getIssuer(RequestAbstractType request) { String fullQualifiedIssuer = request.getIssuer().getValue(); return MultitenantUtils.getTenantAwareUsername(fullQualifiedIssuer); }
public SAMLAbstractRequest(RequestAbstractType request) { if (request.getIssuer() != null) { issuer = request.getIssuer().getValue(); } requestId = request.getID(); }
protected Issuer getIssuer(org.opensaml.saml.saml2.core.Issuer issuer) { return issuer == null ? null : new Issuer() .setValue(issuer.getValue()) .setFormat(NameId.fromUrn(issuer.getFormat())) .setSpNameQualifier(issuer.getSPNameQualifier()) .setNameQualifier(issuer.getNameQualifier()); }
@Override public CriteriaSet apply(final ProfileRequestContext input) { if (logoutRequest != null && logoutRequest.getIssuer() != null && logoutRequest.getNameID() != null) { return new CriteriaSet(new SPSessionCriterion(logoutRequest.getIssuer().getValue(), logoutRequest.getNameID().getValue())); } else { return new CriteriaSet(); } } };
private void prepareArtifactContext(final Response samlResponse, final MessageContext ctx) { val art = ctx.getSubcontext(SAMLArtifactContext.class, true); art.setArtifactType(SAML2ArtifactType0004.TYPE_CODE); art.setSourceEntityId(samlResponse.getIssuer().getValue()); val svc = adaptor.getAssertionConsumerServiceForArtifactBinding(); art.setSourceArtifactResolutionServiceEndpointIndex(svc.getIndex()); art.setSourceArtifactResolutionServiceEndpointURL(svc.getLocation()); } }