Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
c199b7e1
MaxKey
项目概览
yujianwangzivayy
/
MaxKey
与 Fork 源项目一致
Fork自
MaxKey单点登录官方(MaxKeyTop) / MaxKey
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c199b7e1
编写于
2月 02, 2021
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
@ApiOperation
上级
05279684
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
114 addition
and
6 deletion
+114
-6
maxkey-protocols/maxkey-protocol-authorize/src/main/java/org/maxkey/authz/endpoint/AuthorizeEndpoint.java
...ain/java/org/maxkey/authz/endpoint/AuthorizeEndpoint.java
+5
-0
maxkey-protocols/maxkey-protocol-authorize/src/main/java/org/maxkey/authz/endpoint/OnlineTicketEndpoint.java
.../java/org/maxkey/authz/endpoint/OnlineTicketEndpoint.java
+5
-0
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/Cas20AuthorizeEndpoint.java
...org/maxkey/authz/cas/endpoint/Cas20AuthorizeEndpoint.java
+7
-0
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/Cas30AuthorizeEndpoint.java
...org/maxkey/authz/cas/endpoint/Cas30AuthorizeEndpoint.java
+6
-0
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java
...a/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java
+6
-0
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
...java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
+9
-3
maxkey-protocols/maxkey-protocol-desktop/src/main/java/org/maxkey/authz/desktop/endpoint/DesktopAuthorizeEndpoint.java
...xkey/authz/desktop/endpoint/DesktopAuthorizeEndpoint.java
+5
-0
maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java
...xkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java
+5
-0
maxkey-protocols/maxkey-protocol-formbased/src/main/java/org/maxkey/authz/formbased/endpoint/FormBasedAuthorizeEndpoint.java
.../authz/formbased/endpoint/FormBasedAuthorizeEndpoint.java
+5
-0
maxkey-protocols/maxkey-protocol-jwt/src/main/java/org/maxkey/authz/token/endpoint/JwtAuthorizeEndpoint.java
...org/maxkey/authz/token/endpoint/JwtAuthorizeEndpoint.java
+5
-0
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/endpoint/AuthorizationEndpoint.java
...authz/oauth2/provider/endpoint/AuthorizationEndpoint.java
+7
-0
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/endpoint/CheckTokenEndpoint.java
...ey/authz/oauth2/provider/endpoint/CheckTokenEndpoint.java
+5
-0
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/endpoint/TokenEndpoint.java
.../maxkey/authz/oauth2/provider/endpoint/TokenEndpoint.java
+6
-1
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/userinfo/endpoint/UserInfoEndpoint.java
...z/oauth2/provider/userinfo/endpoint/UserInfoEndpoint.java
+7
-1
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/metadata/endpoint/MetadataEndpoint.java
...xkey/authz/saml20/metadata/endpoint/MetadataEndpoint.java
+4
-0
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/IdpInitEndpoint.java
...axkey/authz/saml20/provider/endpoint/IdpInitEndpoint.java
+5
-0
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/LogoutSamlEndpoint.java
...ey/authz/saml20/provider/endpoint/LogoutSamlEndpoint.java
+5
-1
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/SingleSignOnEndpoint.java
.../authz/saml20/provider/endpoint/SingleSignOnEndpoint.java
+6
-0
maxkey-protocols/maxkey-protocol-tokenbased/src/main/java/org/maxkey/authz/token/endpoint/TokenBasedAuthorizeEndpoint.java
...key/authz/token/endpoint/TokenBasedAuthorizeEndpoint.java
+5
-0
maxkey-web-maxkey/src/main/java/org/maxkey/web/endpoint/LogoutEndpoint.java
...src/main/java/org/maxkey/web/endpoint/LogoutEndpoint.java
+6
-0
未找到文件。
maxkey-protocols/maxkey-protocol-authorize/src/main/java/org/maxkey/authz/endpoint/AuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -34,16 +34,21 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
*
*/
@Api
(
tags
=
"总认证地址文档模块"
)
@Controller
public
class
AuthorizeEndpoint
extends
AuthorizeBaseEndpoint
{
@Autowired
AppsCasDetailsService
casDetailsService
;
//all single sign on url
@ApiOperation
(
value
=
"总认证地址接口"
,
notes
=
"参数应用ID,分发到不同应用的认证地址"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/{id}"
)
public
ModelAndView
authorize
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-authorize/src/main/java/org/maxkey/authz/endpoint/OnlineTicketEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -26,6 +26,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"在线ticket文档模块"
)
@Controller
@RequestMapping
(
value
={
"/onlineticket"
})
public
class
OnlineTicketEndpoint
{
...
...
@@ -34,6 +38,7 @@ public class OnlineTicketEndpoint {
@Qualifier
(
"onlineTicketServices"
)
protected
OnlineTicketServices
onlineTicketServices
;
@ApiOperation
(
value
=
"在线ticket验证接口"
,
notes
=
""
,
httpMethod
=
"GET"
)
@ResponseBody
@RequestMapping
(
value
=
"/validate"
)
public
String
ticketValidate
(
...
...
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/Cas20AuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -39,10 +39,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
* https://apereo.github.io/cas/6.2.x/protocol/CAS-Protocol-V2-Specification.html
*/
@Api
(
tags
=
"CAS API文档模块"
)
@Controller
public
class
Cas20AuthorizeEndpoint
extends
CasBaseAuthorizeEndpoint
{
...
...
@@ -163,6 +167,7 @@ INTERNAL_ERROR - an internal error occurred during ticket validation
For all error codes, it is RECOMMENDED that CAS provide a more detailed message as the body of the \<cas:authenticationFailure\> block of the XML response.
*/
@ApiOperation
(
value
=
"CAS 2.0 ticket验证接口"
,
notes
=
"通过ticket获取当前登录用户信息"
,
httpMethod
=
"POST"
)
@RequestMapping
(
"/authz/cas/serviceValidate"
)
@ResponseBody
public
String
serviceValidate
(
...
...
@@ -272,6 +277,8 @@ Response on ticket validation failure:
}
}
*/
@ApiOperation
(
value
=
"CAS 2.0 ticket代理验证接口"
,
notes
=
"通过ticket获取当前登录用户信息"
,
httpMethod
=
"POST"
)
@RequestMapping
(
"/authz/cas/proxyValidate"
)
@ResponseBody
public
String
proxy
(
...
...
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/Cas30AuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -38,15 +38,20 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
* https://apereo.github.io/cas/6.2.x/protocol/CAS-Protocol-Specification.html
*/
@Api
(
tags
=
"CAS API文档模块"
)
@Controller
public
class
Cas30AuthorizeEndpoint
extends
CasBaseAuthorizeEndpoint
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
Cas30AuthorizeEndpoint
.
class
);
@ApiOperation
(
value
=
"CAS 2.0 ticket验证接口"
,
notes
=
"通过ticket获取当前登录用户信息"
,
httpMethod
=
"POST"
)
@RequestMapping
(
"/authz/cas/p3/serviceValidate"
)
@ResponseBody
public
String
serviceValidate
(
...
...
@@ -94,6 +99,7 @@ public class Cas30AuthorizeEndpoint extends CasBaseAuthorizeEndpoint{
return
serviceResponseBuilder
.
serviceResponseBuilder
();
}
@ApiOperation
(
value
=
"CAS 3.0 ticket代理验证接口"
,
notes
=
"通过ticket获取当前登录用户信息"
,
httpMethod
=
"POST"
)
@RequestMapping
(
"/authz/cas/p3/proxyValidate"
)
@ResponseBody
public
String
proxy
(
...
...
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -45,15 +45,20 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
* https://apereo.github.io/cas/6.2.x/protocol/CAS-Protocol.html
*/
@Api
(
tags
=
"CAS API文档模块"
)
@Controller
public
class
CasAuthorizeEndpoint
extends
CasBaseAuthorizeEndpoint
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
CasAuthorizeEndpoint
.
class
);
@ApiOperation
(
value
=
"CAS页面跳转service认证接口"
,
notes
=
"传递参数service"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/cas/login"
)
public
ModelAndView
casLogin
(
HttpServletRequest
request
,
...
...
@@ -66,6 +71,7 @@ public class CasAuthorizeEndpoint extends CasBaseAuthorizeEndpoint{
}
@ApiOperation
(
value
=
"CAS页面跳转应用ID认证接口"
,
notes
=
"传递参数应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/cas/{id}"
)
public
ModelAndView
authorize
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
浏览文件 @
c199b7e1
...
...
@@ -48,10 +48,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
* https://apereo.github.io/cas/6.2.x/protocol/REST-Protocol.html
*/
@Api
(
tags
=
"CAS REST API文档模块"
)
@Controller
public
class
CasRestV1Endpoint
extends
CasBaseAuthorizeEndpoint
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
CasRestV1Endpoint
.
class
);
...
...
@@ -60,7 +64,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
@Qualifier
(
"authenticationProvider"
)
AbstractAuthenticationProvider
authenticationProvider
;
@ApiOperation
(
value
=
"CAS REST认证接口"
,
notes
=
"通过用户名密码获取TGT"
,
httpMethod
=
"POST"
)
@RequestMapping
(
value
=
"/authz/cas/v1/tickets"
,
method
=
RequestMethod
.
POST
,
consumes
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
)
...
...
@@ -97,6 +101,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
}
}
@ApiOperation
(
value
=
"CAS REST认证接口"
,
notes
=
"通过TGT获取ST"
,
httpMethod
=
"POST"
)
@RequestMapping
(
value
=
"/authz/cas/v1/tickets/{ticketGrantingTicket}"
,
method
=
RequestMethod
.
POST
,
consumes
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
)
...
...
@@ -124,7 +129,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
}
return
new
ResponseEntity
<>(
""
,
HttpStatus
.
BAD_REQUEST
);
}
@ApiOperation
(
value
=
"CAS REST认证接口"
,
notes
=
"检查TGT状态"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/authz/cas/v1/tickets/{ticketGrantingTicket}"
,
method
=
RequestMethod
.
GET
)
public
ResponseEntity
<
String
>
verifyTicketGrantingTicketStatus
(
...
...
@@ -144,6 +149,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
return
new
ResponseEntity
<>(
""
,
HttpStatus
.
NOT_FOUND
);
}
@ApiOperation
(
value
=
"CAS REST认证接口"
,
notes
=
"注销TGT状态"
,
httpMethod
=
"DELETE"
)
@RequestMapping
(
value
=
"/authz/cas/v1/tickets/{ticketGrantingTicket}"
,
method
=
RequestMethod
.
DELETE
)
public
ResponseEntity
<
String
>
destroyTicketGrantingTicket
(
...
...
@@ -163,7 +169,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
return
new
ResponseEntity
<>(
""
,
HttpStatus
.
NOT_FOUND
);
}
@ApiOperation
(
value
=
"CAS REST认证接口"
,
notes
=
"用户名密码登录接口"
,
httpMethod
=
"POST"
)
@RequestMapping
(
value
=
"/authz/cas/v1/users"
,
method
=
RequestMethod
.
POST
,
consumes
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
)
...
...
maxkey-protocols/maxkey-protocol-desktop/src/main/java/org/maxkey/authz/desktop/endpoint/DesktopAuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -40,10 +40,14 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
*
*/
@Api
(
tags
=
"Desktop接口文档模块"
)
@Controller
public
class
DesktopAuthorizeEndpoint
extends
AuthorizeBaseEndpoint
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
DesktopAuthorizeEndpoint
.
class
);
...
...
@@ -53,6 +57,7 @@ public class DesktopAuthorizeEndpoint extends AuthorizeBaseEndpoint{
DesktopDefaultAdapter
defaultDesktopAdapter
=
new
DesktopDefaultAdapter
();
@ApiOperation
(
value
=
"Desktop认证接口"
,
notes
=
"传递参数应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/desktop/{id}"
)
public
ModelAndView
authorize
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -36,14 +36,19 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
*
*/
@Api
(
tags
=
"ExtendApi接口文档模块"
)
@Controller
public
class
ExtendApiAuthorizeEndpoint
extends
AuthorizeBaseEndpoint
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
ExtendApiAuthorizeEndpoint
.
class
);
@ApiOperation
(
value
=
"ExtendApi认证地址接口"
,
notes
=
"参数应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/api/{id}"
)
public
ModelAndView
authorize
(
HttpServletRequest
request
,
@PathVariable
(
"id"
)
String
id
){
...
...
maxkey-protocols/maxkey-protocol-formbased/src/main/java/org/maxkey/authz/formbased/endpoint/FormBasedAuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -40,10 +40,14 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
*
*/
@Api
(
tags
=
"FormBased接口文档模块"
)
@Controller
public
class
FormBasedAuthorizeEndpoint
extends
AuthorizeBaseEndpoint
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
FormBasedAuthorizeEndpoint
.
class
);
...
...
@@ -53,6 +57,7 @@ public class FormBasedAuthorizeEndpoint extends AuthorizeBaseEndpoint{
FormBasedDefaultAdapter
defaultFormBasedAdapter
=
new
FormBasedDefaultAdapter
();
@ApiOperation
(
value
=
"FormBased认证地址接口"
,
notes
=
"参数应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/formbased/{id}"
)
public
ModelAndView
authorize
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-jwt/src/main/java/org/maxkey/authz/token/endpoint/JwtAuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -43,10 +43,14 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
*
*/
@Api
(
tags
=
"JWT接口文档模块"
)
@Controller
public
class
JwtAuthorizeEndpoint
extends
AuthorizeBaseEndpoint
{
...
...
@@ -60,6 +64,7 @@ public class JwtAuthorizeEndpoint extends AuthorizeBaseEndpoint{
@Autowired
ApplicationConfig
applicationConfig
;
@ApiOperation
(
value
=
"JWT认证地址接口"
,
notes
=
"参数应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/jwt/{id}"
)
public
ModelAndView
authorize
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/endpoint/AuthorizationEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -70,6 +70,10 @@ import org.springframework.web.servlet.view.RedirectView;
import
org.springframework.web.util.UriComponents
;
import
org.springframework.web.util.UriComponentsBuilder
;
import
org.springframework.web.util.UriTemplate
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.maxkey.authz.oauth2.provider.ClientDetailsService
;
/**
...
...
@@ -89,6 +93,7 @@ import org.maxkey.authz.oauth2.provider.ClientDetailsService;
* @author Vladimir Kryachko
*
*/
@Api
(
tags
=
"OAuth v2.0 API文档模块"
)
@Controller
@SessionAttributes
(
"authorizationRequest"
)
public
class
AuthorizationEndpoint
extends
AbstractEndpoint
{
...
...
@@ -126,6 +131,7 @@ public class AuthorizationEndpoint extends AbstractEndpoint {
this
.
errorPage
=
errorPage
;
}
@ApiOperation
(
value
=
"OAuth 2.0 认证接口"
,
notes
=
"传递参数client_id,response_type,redirect_uri等"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/oauth/v20/authorize"
,
method
=
RequestMethod
.
GET
)
public
ModelAndView
authorize
(
Map
<
String
,
Object
>
model
,
@RequestParam
Map
<
String
,
String
>
parameters
,
SessionStatus
sessionStatus
)
{
...
...
@@ -507,6 +513,7 @@ public class AuthorizationEndpoint extends AbstractEndpoint {
this
.
oauth2RequestValidator
=
oauth2RequestValidator
;
}
@ApiOperation
(
value
=
"OAuth 2.0 认证接口"
,
notes
=
"传递参数应用ID,自动完成跳转认证拼接"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/oauthv20/{id}"
)
public
ModelAndView
authorize
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/endpoint/CheckTokenEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -47,12 +47,16 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* Controller which decodes access tokens for clients who are not able to do so (or where opaque token values are used).
*
* @author Luke Taylor
* @author Joel D'sa
*/
@Api
(
tags
=
"OAuth v2.0 API文档模块"
)
@Controller
public
class
CheckTokenEndpoint
{
...
...
@@ -76,6 +80,7 @@ public class CheckTokenEndpoint {
this
.
accessTokenConverter
=
accessTokenConverter
;
}
@ApiOperation
(
value
=
"OAuth 2.0 token检查接口"
,
notes
=
"传递参数token"
,
httpMethod
=
"POST"
)
@RequestMapping
(
value
=
"/oauth/v20/check_token"
)
@ResponseBody
public
Map
<
String
,
?>
checkToken
(
@RequestParam
(
"token"
)
String
value
)
{
...
...
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/endpoint/TokenEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -52,6 +52,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* <p>
* Endpoint for token requests as described in the OAuth2 spec. Clients post requests with a <code>grant_type</code>
...
...
@@ -69,6 +72,7 @@ import org.springframework.web.bind.annotation.RequestParam;
* @author Dave Syer
*
*/
@Api
(
tags
=
"OAuth v2.0 API文档模块"
)
@Controller
public
class
TokenEndpoint
extends
AbstractEndpoint
{
...
...
@@ -84,6 +88,7 @@ public class TokenEndpoint extends AbstractEndpoint {
* @return OAuth2AccessToken Entity
* @throws HttpRequestMethodNotSupportedException
*/
@ApiOperation
(
value
=
"OAuth 2.0 获取AccessToken接口"
,
notes
=
"传递参数token等"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/oauth/v20/token"
,
method
=
RequestMethod
.
GET
)
public
ResponseEntity
<
OAuth2AccessToken
>
getAccessToken
(
@RequestParam
Map
<
String
,
String
>
parameters
)
throws
HttpRequestMethodNotSupportedException
{
...
...
@@ -93,7 +98,7 @@ public class TokenEndpoint extends AbstractEndpoint {
return
postAccessToken
(
parameters
);
}
@ApiOperation
(
value
=
"OAuth 2.0 获取AccessToken接口"
,
notes
=
"传递参数token等"
,
httpMethod
=
"POST"
)
@RequestMapping
(
value
=
"/oauth/v20/token"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
<
OAuth2AccessToken
>
postAccessToken
(
@RequestParam
Map
<
String
,
String
>
parameters
)
throws
HttpRequestMethodNotSupportedException
{
...
...
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/userinfo/endpoint/UserInfoEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -67,8 +67,13 @@ import com.nimbusds.jwt.EncryptedJWT;
import
com.nimbusds.jwt.JWT
;
import
com.nimbusds.jwt.JWTClaimsSet
;
import
com.nimbusds.jwt.JWTClaimsSet.Builder
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
com.nimbusds.jwt.SignedJWT
;
@Api
(
tags
=
"OAuth v2.0 API文档模块"
)
@Controller
@RequestMapping
(
value
=
{
"/api"
})
public
class
UserInfoEndpoint
{
...
...
@@ -108,6 +113,7 @@ public class UserInfoEndpoint {
OAuthDefaultUserInfoAdapter
defaultOAuthUserInfoAdapter
=
new
OAuthDefaultUserInfoAdapter
();
@ApiOperation
(
value
=
"OAuth 2.0 用户信息接口"
,
notes
=
"传递参数access_token"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/oauth/v20/me"
)
@ResponseBody
public
String
apiV20UserInfo
(
...
...
@@ -148,7 +154,7 @@ public class UserInfoEndpoint {
}
}
@ApiOperation
(
value
=
"OIDC 用户信息接口"
,
notes
=
"传递Authorization参数access_token"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/connect/v10/userinfo"
)
@ResponseBody
public
String
connect10aUserInfo
(
...
...
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/metadata/endpoint/MetadataEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -49,7 +49,10 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"SAML v2.0 API文档模块"
)
@Controller
@RequestMapping
(
value
=
{
"/metadata/saml20/"
})
public
class
MetadataEndpoint
{
...
...
@@ -72,6 +75,7 @@ public class MetadataEndpoint {
public
static
String
IDP_METADATA_PREFIX
=
"Idp_Metadata_"
;
@ApiOperation
(
value
=
"SAML 2.0 元数据接口"
,
notes
=
"参数Idp_Metadata_应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/{appid}.xml"
,
produces
=
"application/xml"
)
@ResponseBody
public
String
metadata
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/IdpInitEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -40,12 +40,16 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* idp init not need extract SAML request message
* AuthnRequestInfo use default init
* @author Crystal.Sea
*
*/
@Api
(
tags
=
"SAML v2.0 API文档模块"
)
@Controller
public
class
IdpInitEndpoint
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
IdpInitEndpoint
.
class
);
...
...
@@ -81,6 +85,7 @@ public class IdpInitEndpoint {
*
*
*/
@ApiOperation
(
value
=
"SAML 2.0 IDP Init接口"
,
notes
=
"传递参数应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/authz/saml20/idpinit/{appid}"
,
method
=
RequestMethod
.
GET
)
public
ModelAndView
authorizeIdpInit
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/LogoutSamlEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -37,6 +37,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"SAML v2.0 API文档模块"
)
@Controller
public
class
LogoutSamlEndpoint
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
LogoutSamlEndpoint
.
class
);
...
...
@@ -49,7 +53,7 @@ public class LogoutSamlEndpoint {
@Qualifier
(
"samlValidaotrSuite"
)
private
SAML2ValidatorSuite
validatorSuite
;
@ApiOperation
(
value
=
"SAML单点注销地址接口"
,
notes
=
""
,
httpMethod
=
"GET"
)
@SuppressWarnings
(
"rawtypes"
)
@RequestMapping
(
value
=
"/logout/saml"
,
method
=
RequestMethod
.
GET
)
public
ModelAndView
samlRedirectLogout
(
...
...
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/SingleSignOnEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -45,6 +45,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"SAML v2.0 API文档模块"
)
@Controller
public
class
SingleSignOnEndpoint
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
SingleSignOnEndpoint
.
class
);
...
...
@@ -74,6 +78,7 @@ public class SingleSignOnEndpoint {
@Autowired
private
AppsSaml20DetailsService
saml20DetailsService
;
@ApiOperation
(
value
=
"SAML 2.0 SP Init接收接口"
,
notes
=
"传递参数应用ID"
,
httpMethod
=
"POST"
)
@RequestMapping
(
value
=
"/authz/saml20/{appid}"
,
method
=
RequestMethod
.
POST
)
public
ModelAndView
authorizePost
(
HttpServletRequest
request
,
...
...
@@ -83,6 +88,7 @@ public class SingleSignOnEndpoint {
return
extractSAMLRequest
(
extractPostBindingAdapter
,
appId
,
request
);
}
@ApiOperation
(
value
=
"SAML 2.0 SP Init接收接口"
,
notes
=
"传递参数应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/authz/saml20/{appid}"
,
method
=
RequestMethod
.
GET
)
public
ModelAndView
authorizeRedirect
(
HttpServletRequest
request
,
...
...
maxkey-protocols/maxkey-protocol-tokenbased/src/main/java/org/maxkey/authz/token/endpoint/TokenBasedAuthorizeEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -43,10 +43,14 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @author Crystal.Sea
*
*/
@Api
(
tags
=
"TokenBased接口文档模块"
)
@Controller
public
class
TokenBasedAuthorizeEndpoint
extends
AuthorizeBaseEndpoint
{
...
...
@@ -59,6 +63,7 @@ public class TokenBasedAuthorizeEndpoint extends AuthorizeBaseEndpoint{
@Autowired
ApplicationConfig
applicationConfig
;
@ApiOperation
(
value
=
"TokenBased认证接口"
,
notes
=
"传递参数应用ID"
,
httpMethod
=
"GET"
)
@RequestMapping
(
"/authz/tokenbased/{id}"
)
public
ModelAndView
authorize
(
HttpServletRequest
request
,
...
...
maxkey-web-maxkey/src/main/java/org/maxkey/web/endpoint/LogoutEndpoint.java
浏览文件 @
c199b7e1
...
...
@@ -48,6 +48,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"单点注销接口文档模块"
)
@Controller
public
class
LogoutEndpoint
{
...
...
@@ -66,6 +70,7 @@ public class LogoutEndpoint {
@Qualifier
(
"onlineTicketServices"
)
protected
OnlineTicketServices
onlineTicketServices
;
@ApiOperation
(
value
=
"单点注销接口"
,
notes
=
"reLoginUrl跳转地址"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
={
"/logout"
})
public
ModelAndView
logout
(
HttpServletRequest
request
,
...
...
@@ -75,6 +80,7 @@ public class LogoutEndpoint {
return
logoutModelAndView
(
request
,
response
,
"loggedout"
,
reLoginUrl
);
}
@ApiOperation
(
value
=
"登录超时接口"
,
notes
=
""
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
={
"/timeout"
})
public
ModelAndView
timeout
(
HttpServletRequest
request
,
HttpServletResponse
response
){
return
logoutModelAndView
(
request
,
response
,
"timeout"
,
null
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录