@Test public void testPopulateLocalEntityAliasSPRole() throws Exception { expect(request.getContextPath()).andReturn("/SSO/alias/myAlias/sp"); replayMock(); SAMLMessageContext context = contextProvider.getLocalEntity(request, response); assertEquals("testSP2", context.getLocalEntityId()); assertEquals(SPSSODescriptor.DEFAULT_ELEMENT_NAME, context.getLocalEntityRole()); verifyMock(); }
public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException { SAMLMessageContext context = new SAMLMessageContext(); populateEntityId(context, request.getContextPath()); populateContext(request, response, context); return context; }
SAMLContextProviderImpl implements SAMLContextProvider, InitializingBean { public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException { SAMLMessageContext context = new SAMLMessageContext(); populateEntityId(context, request.getContextPath()); populateContext(request, response, context); return context; } }
SAMLContextProviderImpl implements SAMLContextProvider, InitializingBean { public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException { SAMLMessageContext context = new SAMLMessageContext(); populateEntityId(context, request.getContextPath()); populateContext(request, response, context); return context; }  }
SAMLContextProviderImpl implements SAMLContextProvider, InitializingBean { public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException { SAMLMessageContext context = new SAMLMessageContext(); populateEntityId(context, request.getContextPath()); populateContext(request, response, context); return context; }  SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response); SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response, SAMLCredential credential); @Autowired void setMetadata(MetadataManager metadata); @Autowired void setKeyManager(KeyManager keyManager); void afterPropertiesSet(); }
SAMLContextProviderImpl implements SAMLContextProvider, InitializingBean { public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException { SAMLMessageContext context = new SAMLMessageContext(); populateEntityId(context, request.getContextPath()); populateContext(request, response, context); return context; }  SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response); SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response, SAMLCredential credential); @Autowired void setMetadata(MetadataManager metadata); @Autowired void setKeyManager(KeyManager keyManager); void afterPropertiesSet();  }