entityId = (String) inTransport.getAttribute(org.springframework.security.saml.SAMLConstants.LOCAL_ENTITY_ID); if (entityId != null) { log.debug("Using protocol specified IdP {}", entityId);
entityId = (String) inTransport.getAttribute(org.springframework.security.saml.SAMLConstants.LOCAL_ENTITY_ID); if (entityId != null) {
/** * First tries to find pre-configured IDP from the request attribute. If not found * loads the IDP_PARAMETER from the request and if it is not null verifies whether IDP with this value is valid * IDP in our circle of trust. Processing fails when IDP is not valid. IDP is set as PeerEntityId in the context. * <p> * If request parameter is null the default IDP is returned. * * @param context context to populate ID for * @throws MetadataProviderException in case provided IDP value is invalid */ protected void populatePeerEntityId(SAMLMessageContext context) throws MetadataProviderException { HTTPInTransport inTransport = (HTTPInTransport) context.getInboundMessageTransport(); String entityId; entityId = (String) inTransport.getAttribute(org.springframework.security.saml.SAMLConstants.PEER_ENTITY_ID); if (entityId != null) { // Pre-configured entity Id log.debug("Using protocol specified IDP {}", entityId); } else { entityId = inTransport.getParameterValue(SAMLEntryPoint.IDP_PARAMETER); if (entityId != null) { // IDP from request log.debug("Using user specified IDP {} from request", entityId); context.setPeerUserSelected(true); } else { // Default IDP entityId = metadata.getDefaultIDP(); log.debug("No IDP specified, using default {}", entityId); context.setPeerUserSelected(false); } } context.setPeerEntityId(entityId); context.setPeerEntityRole(IDPSSODescriptor.DEFAULT_ELEMENT_NAME); }
entityId = (String) inTransport.getAttribute(org.springframework.security.saml.SAMLConstants.LOCAL_ENTITY_ID); if (entityId != null) { log.debug("Using protocol specified SP {}", entityId);