mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 08:59:10 +08:00
oidc wellknown接口优化
This commit is contained in:
parent
9896c141ef
commit
fb48d582f0
@ -48,8 +48,8 @@ public class OauthJwksEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public String keysMetadataByParam(HttpServletRequest request , HttpServletResponse response,
|
||||
@RequestParam(required = false) String inst_id,
|
||||
@RequestParam(required = false) String client_id) {
|
||||
@RequestParam(value="inst_id",required = false) String inst_id,
|
||||
@RequestParam(value="client_id",required = false) String client_id) {
|
||||
return buildMetadata(request,response,inst_id,client_id,ContentType.JSON);
|
||||
}
|
||||
|
||||
@ -58,7 +58,8 @@ public class OauthJwksEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public String keysMetadatabyPath(HttpServletRequest request , HttpServletResponse response,
|
||||
@PathVariable String instId,@PathVariable String clientId) {
|
||||
@PathVariable(value="instId") String instId,
|
||||
@PathVariable(value="clientId") String clientId) {
|
||||
return buildMetadata(request,response,instId,clientId,ContentType.JSON);
|
||||
}
|
||||
|
||||
@ -68,8 +69,8 @@ public class OauthJwksEndpoint extends AbstractEndpoint {
|
||||
method={RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
public String metadata(HttpServletRequest request , HttpServletResponse response,
|
||||
@PathVariable(value="clientId", required = false) String clientId,
|
||||
@PathVariable(value="mediaType", required = false) String mediaType) {
|
||||
@PathVariable(value="clientId") String clientId,
|
||||
@PathVariable(value="mediaType") String mediaType) {
|
||||
return buildMetadata(request,response,null,clientId,mediaType);
|
||||
}
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ public class OauthAuthorizationServerEndpoint extends AbstractEndpoint {
|
||||
jwksUri.append("?");
|
||||
jwksUri.append("client_id").append("=").append(clientDetails.getClientId());
|
||||
if(StringUtils.isNotBlank(instId)) {
|
||||
jwksUri.append("&").append("inst_id").append("=").append(clientDetails.getClientId());
|
||||
jwksUri.append("&").append("inst_id").append("=").append(instId);
|
||||
}
|
||||
oauthConfig.setJwks_uri(jwksUri.toString());
|
||||
}else {
|
||||
|
||||
@ -93,7 +93,7 @@ public class OpenidConfigurationEndpoint extends AbstractEndpoint {
|
||||
jwksUri.append("?");
|
||||
jwksUri.append("client_id").append("=").append(clientDetails.getClientId());
|
||||
if(StringUtils.isNotBlank(instId)) {
|
||||
jwksUri.append("&").append("inst_id").append("=").append(clientDetails.getClientId());
|
||||
jwksUri.append("&").append("inst_id").append("=").append(instId);
|
||||
}
|
||||
openidConfig.setJwks_uri(jwksUri.toString());
|
||||
}else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user