Browse Source

client publisher mapping test

pull/210/head
Justin Richer 12 years ago
parent
commit
edeae29bef
  1. 41
      openid-connect-client/src/main/java/org/mitre/openid/connect/client/ClientKeyPublisherMapping.java

41
openid-connect-client/src/main/java/org/mitre/openid/connect/client/ClientKeyPublisherMapping.java

@ -0,0 +1,41 @@
/**
*
*/
package org.mitre.openid.connect.client;
import javax.servlet.http.HttpServletRequest;
import org.mitre.openid.connect.web.JsonWebKeyEndpoint;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.handler.AbstractUrlHandlerMapping;
/**
* @author jricher
*
*/
@Component
public class ClientKeyPublisherMapping extends AbstractUrlHandlerMapping implements InitializingBean {
private JsonWebKeyEndpoint controller;
private String url;
public void setKeyUrl(String url, JsonWebKeyEndpoint controller) {
this.url = url;
this.controller = controller;
}
/* (non-Javadoc)
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
@Override
public void afterPropertiesSet() throws Exception {
if (url != null && controller != null) {
super.registerHandler(url, controller);
}
}
}
Loading…
Cancel
Save