✨ 自定义重定向
parent
c75b9001b3
commit
27f9b99e4c
@ -1,18 +1,16 @@
|
|||||||
package org.alis.amu.summer.security.handler;
|
package org.alis.amu.summer.security.handler;
|
||||||
|
|
||||||
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
|
import org.springframework.security.oauth2.provider.endpoint.DefaultRedirectResolver;
|
||||||
import org.springframework.security.oauth2.provider.ClientDetails;
|
|
||||||
import org.springframework.security.oauth2.provider.endpoint.RedirectResolver;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author robin
|
* @author robin
|
||||||
* @date 2022/1/26 14:26
|
* @date 2022/1/26 14:26
|
||||||
*/
|
*/
|
||||||
public class RedirectHandler implements RedirectResolver {
|
public class RedirectHandler extends DefaultRedirectResolver {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String resolveRedirect(String requestedRedirect, ClientDetails client) throws OAuth2Exception {
|
protected boolean redirectMatches(String requestedRedirect, String redirectUri) {
|
||||||
return requestedRedirect;
|
return super.redirectMatches(requestedRedirect, redirectUri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue