I have created a new saml 2 enabled application in okta. where I have given my custom domain name like ( http://myapp.example.com/saml/SSO) in Single Sign On URL and Audience Restriction instead of
Single Sign On URL= http://host:port/saml/SSO and
Audience Restriction= http://host:port/saml/metadata.
but I am getting error like.
org.opensaml.saml2.metadata.provider.MetadataProviderException: Metadata for entity http://myapp.example.com/saml/metadata and role {urn:oasis:names:tc:SAML:2.0:metadata}SPSSODescriptor wasn’t found
org.springframework.security.saml.context.SAMLContextProviderImpl.populateLocalEntity(SAMLContextProviderImpl.java:319)
org.springframework.security.saml.context.SAMLContextProviderImpl.populateLocalContext(SAMLContextProviderImpl.java:216)
org.springframework.security.saml.context.SAMLContextProviderImpl.getLocalEntity(SAMLContextProviderImpl.java:107)
org.springframework.security.saml.SAMLDiscovery.processDiscoveryRequest(SAMLDiscovery.java:183)
org.springframework.security.saml.SAMLDiscovery.doFilter(SAMLDiscovery.java:141)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:166)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.saml.metadata.MetadataGeneratorFilter.doFilter(MetadataGeneratorFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:124)
Note**: with host and port its getting validated and redirecting to okta login page