Search in sources :

Example 1 with EndpointGenerator

use of org.maxkey.authz.saml.common.EndpointGenerator in project MaxKey by dromara.

the class ConsumerEndpoint method afterPropertiesSet.

public void afterPropertiesSet() throws Exception {
    authnRequestGenerator = new AuthnRequestGenerator(keyStoreLoader.getEntityName(), timeService, idService);
    endpointGenerator = new EndpointGenerator();
    CriteriaSet criteriaSet = new CriteriaSet();
    criteriaSet.add(new EntityIDCriteria(keyStoreLoader.getEntityName()));
    criteriaSet.add(new UsageCriteria(UsageType.SIGNING));
    try {
        signingCredential = credentialResolver.resolveSingle(criteriaSet);
    } catch (SecurityException e) {
        logger.error("证书解析出错", e);
        throw new Exception(e);
    }
    Validate.notNull(signingCredential);
}
Also used : AuthnRequestGenerator(org.maxkey.authz.saml20.consumer.AuthnRequestGenerator) EntityIDCriteria(org.opensaml.xml.security.criteria.EntityIDCriteria) UsageCriteria(org.opensaml.xml.security.criteria.UsageCriteria) EndpointGenerator(org.maxkey.authz.saml.common.EndpointGenerator) CriteriaSet(org.opensaml.xml.security.CriteriaSet) SecurityException(org.opensaml.xml.security.SecurityException) MessageDecodingException(org.opensaml.ws.message.decoder.MessageDecodingException) IdentityProviderAuthenticationException(org.maxkey.authz.saml20.consumer.spring.IdentityProviderAuthenticationException) ValidationException(org.opensaml.xml.validation.ValidationException) SecurityException(org.opensaml.xml.security.SecurityException) ServiceProviderAuthenticationException(org.maxkey.authz.saml20.consumer.spring.ServiceProviderAuthenticationException)

Aggregations

EndpointGenerator (org.maxkey.authz.saml.common.EndpointGenerator)1 AuthnRequestGenerator (org.maxkey.authz.saml20.consumer.AuthnRequestGenerator)1 IdentityProviderAuthenticationException (org.maxkey.authz.saml20.consumer.spring.IdentityProviderAuthenticationException)1 ServiceProviderAuthenticationException (org.maxkey.authz.saml20.consumer.spring.ServiceProviderAuthenticationException)1 MessageDecodingException (org.opensaml.ws.message.decoder.MessageDecodingException)1 CriteriaSet (org.opensaml.xml.security.CriteriaSet)1 SecurityException (org.opensaml.xml.security.SecurityException)1 EntityIDCriteria (org.opensaml.xml.security.criteria.EntityIDCriteria)1 UsageCriteria (org.opensaml.xml.security.criteria.UsageCriteria)1 ValidationException (org.opensaml.xml.validation.ValidationException)1