Spring boot 如何简化KeyClope rest API服务

Spring boot 如何简化KeyClope rest API服务,spring-boot,keycloak,netflix-zuul,Spring Boot,Keycloak,Netflix Zuul,到目前为止,我已经完成了KeyClope配置和设置。授权也完成了。但我使用的是keydape的不同rest服务(token\u端点、Introspection\u端点…)。是否有任何特殊的keyclaok restapi或任何其他简单的授权方法 //GetRightage.java public List<String> getEntitlement(){ //Step -1 //get access token from token_endpoint rest servi

到目前为止,我已经完成了KeyClope配置和设置。授权也完成了。但我使用的是keydape的不同rest服务(token\u端点、Introspection\u端点…)。是否有任何特殊的keyclaok restapi或任何其他简单的授权方法

//GetRightage.java

public List<String> getEntitlement(){

  //Step -1
  //get access token from token_endpoint rest service     


 //"token_endpoint":"http://localhost:8080/auth/realms/MyRealm/protocol/openid-connect/token",

  //step -2
  //get RPT by Using Authorization:Bearer {AccessToken} header -->from token_endpoint rest service

 //"token_endpoint":"http://localhost:8080/auth/realms/MyRealm/protocol/openid-connect/token"

  //step -3
  //get the Permissions and resources by introspecting
  //Introspecting Rpt by passing RPT to introspection_endpoint

 //"introspection_endpoint":"http://localhost:8080/auth/realms/MyRealm/protocol/openid-connect/token/introspect"


  //step -4
  //return the Permissions and resources

}
public List getauthentication(){
//第1步
//从令牌\终端rest服务获取访问令牌
//“令牌\u终结点”:http://localhost:8080/auth/realms/MyRealm/protocol/openid-连接/令牌“,
//步骤2
//通过使用来自令牌\终端rest服务的Authorization:bearrier{AccessToken}头-->获取RPT
//“令牌\u终结点”:http://localhost:8080/auth/realms/MyRealm/protocol/openid-连接/令牌”
//步骤3
//通过内省获取权限和资源
//通过将Rpt传递给内省端点来内省Rpt
//“自省终结点”:http://localhost:8080/auth/realms/MyRealm/protocol/openid-连接/令牌/内省”
//步骤4
//返回权限和资源
}

使用正确的JAR和版本。您需要粘贴您已经完成的代码。这样我们可以验证并告诉您正确的答案,或者您可以在KeyClope文档中找到以前的代码。但是Api调用的数量使我的应用程序速度变慢。所以我需要一个RESTAPI来完成授权。我希望前面的代码在这里不是必需的。谢谢你的建议。