-
大小: 2.75MB文件類型: .zip金幣: 2下載: 0 次發布日期: 2023-09-21
- 語言: 數據庫
- 標簽: SpringClouud??zuul??oauth??權限控制??
資源簡介
在Spring Cloud需要使用OAUTH2來實現多個微服務的統一認證授權,通過向OAUTH服務發送某個類型的grant type進行集中認證和授權,從而獲得access_token,而這個token是受其他微服務信任的,我們在后續的訪問可以通過access_token來進行,從而實現了微服務的統一認證授權。

代碼片段和文件信息
package?com.hfcsbc;
import?org.springframework.boot.SpringApplication;
import?org.springframework.boot.autoconfigure.SpringBootApplication;
import?org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import?org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import?org.springframework.cloud.netflix.zuul.EnableZuulProxy;
@SpringBootApplication
@EnableZuulProxy
@EnableDiscoveryClient
@EnableOAuth2Sso
public?class?ApiGatewayApplication?{
public?static?void?main(String[]?args)?{
SpringApplication.run(ApiGatewayApplication.class?args);
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-04-12?10:28??uaa-zuul\
?????目錄???????????0??2018-04-12?11:14??uaa-zuul\.git\
?????文件?????????304??2018-04-12?10:14??uaa-zuul\.git\config
?????文件??????????73??2018-04-12?10:14??uaa-zuul\.git\desc
?????文件??????????23??2018-04-12?10:14??uaa-zuul\.git\HEAD
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\hooks\
?????文件?????????478??2018-04-12?10:14??uaa-zuul\.git\hooks\applypatch-msg.sample
?????文件?????????896??2018-04-12?10:14??uaa-zuul\.git\hooks\commit-msg.sample
?????文件????????3327??2018-04-12?10:14??uaa-zuul\.git\hooks\fsmonitor-watchman.sample
?????文件?????????189??2018-04-12?10:14??uaa-zuul\.git\hooks\post-update.sample
?????文件?????????424??2018-04-12?10:14??uaa-zuul\.git\hooks\pre-applypatch.sample
?????文件????????1642??2018-04-12?10:14??uaa-zuul\.git\hooks\pre-commit.sample
?????文件????????1348??2018-04-12?10:14??uaa-zuul\.git\hooks\pre-push.sample
?????文件????????4898??2018-04-12?10:14??uaa-zuul\.git\hooks\pre-reba
?????文件?????????544??2018-04-12?10:14??uaa-zuul\.git\hooks\pre-receive.sample
?????文件????????1492??2018-04-12?10:14??uaa-zuul\.git\hooks\prepare-commit-msg.sample
?????文件????????3610??2018-04-12?10:14??uaa-zuul\.git\hooks\update.sample
?????文件????????8576??2018-04-12?10:16??uaa-zuul\.git\index
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\info\
?????文件?????????240??2018-04-12?10:14??uaa-zuul\.git\info\exclude
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\logs\
?????文件?????????188??2018-04-12?10:14??uaa-zuul\.git\logs\HEAD
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\logs\refs\
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\logs\refs\heads\
?????文件?????????188??2018-04-12?10:14??uaa-zuul\.git\logs\refs\heads\master
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\logs\refs\remotes\
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\logs\refs\remotes\origin\
?????文件?????????188??2018-04-12?10:14??uaa-zuul\.git\logs\refs\remotes\origin\HEAD
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\ob
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\ob
?????目錄???????????0??2018-04-12?10:14??uaa-zuul\.git\ob
............此處省略253個文件信息
評論
共有 條評論