💩 去掉非强制的依赖项
This commit is contained in:
@@ -3,9 +3,6 @@ package me.zhyd.oauth.request;
|
||||
import me.zhyd.oauth.exception.AuthException;
|
||||
import me.zhyd.oauth.model.AuthResponse;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
|
||||
* @version 1.0
|
||||
@@ -15,15 +12,6 @@ import java.io.IOException;
|
||||
*/
|
||||
public interface AuthRequest {
|
||||
|
||||
/**
|
||||
* 自动跳转到认证页面
|
||||
*
|
||||
* @param response response
|
||||
*/
|
||||
default void authorize(HttpServletResponse response) throws IOException {
|
||||
throw new AuthException(ResponseStatus.NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回认证url,可自行跳转页面
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,6 @@ import me.zhyd.oauth.utils.IpUtils;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import me.zhyd.oauth.utils.UrlBuilder;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
|
||||
|
||||
@@ -9,9 +9,6 @@ import me.zhyd.oauth.model.AuthUser;
|
||||
import me.zhyd.oauth.utils.AuthConfigChecker;
|
||||
import me.zhyd.oauth.utils.UrlBuilder;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
|
||||
* @version 1.0
|
||||
@@ -43,11 +40,6 @@ public abstract class BaseAuthRequest implements AuthRequest {
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void authorize(HttpServletResponse response) throws IOException {
|
||||
response.sendRedirect(this.authorize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String authorize() {
|
||||
String authorizeUrl = null;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package me.zhyd.oauth.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user