1 package org.springframework.security.oauth2.provider.endpoint; 2 3 4 5 /** 6 * Strict implementation for a redirect resolver which requires 7 * an exact match between the registered and requested redirect_uri. 8 * 9 * @author Ryan Heaton 10 * @author Dave Syer 11 */ 12 public class ExactMatchRedirectResolver extends DefaultRedirectResolver { 13 14 /** 15 * Whether the requested redirect URI "matches" the specified redirect URI. This implementation tests strict 16 * equality. 17 * 18 * @param requestedRedirect The requested redirect URI. 19 * @param redirectUri The registered redirect URI. 20 * @return Whether the requested redirect URI "matches" the specified redirect URI. 21 */ 22 protected boolean redirectMatches(String requestedRedirect, String redirectUri) { 23 return requestedRedirect.equals(redirectUri); 24 } 25 26 }