youlai-mall/docs/diagram/oauth2/password.puml

34 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-03-20 23:53:34 +08:00
` 有来 Spring Security OAuth2 密码模式
@startuml
'https://plantuml.com/sequence-diagram
skinparam backgroundColor #EEEBDC
skinparam handwritten true
2022-12-11 10:35:23 +08:00
header @有来技术 Spring Security OAuth2 密码模式
2022-03-20 23:53:34 +08:00
actor 客户端
客户端 -> AuthController: 密码模式 \n /oauth/token?gran_type=password
AuthController -> TokenEndpoint: postAccessToken()
TokenEndpoint -> CompositeTokenGranter: this.getTokenGranter().grant()
CompositeTokenGranter->ResourceOwnerPasswordTokenGranter:grant( grantType, tokenRequest )\n根据 grant_type 匹配 Granter
note over of AuthenticationManagerDelegator #aqua
WebSecurityConfigurerAdapter 内部类
end note
ResourceOwnerPasswordTokenGranter-> AuthenticationManagerDelegator:this.authenticationManager.authenticate()
AuthenticationManagerDelegator -> ProviderManager: this.delegate.authenticate()
ProviderManager -> ProviderManager: 匹配支持\nUsernamePasswordAuthenticationToken\n的Provider
activate ProviderManager
ProviderManager -> DaoAuthenticationProvider: provider.authenticate(authentication)
deactivate ProviderManager
DaoAuthenticationProvider -> DaoAuthenticationProvider:authenticate()\n密码判读
ProviderManager <-- DaoAuthenticationProvider: Authentication
AuthenticationManagerDelegator <-- ProviderManager: Authentication
ResourceOwnerPasswordTokenGranter <-- AuthenticationManagerDelegator: OAuth2Authentication
2022-09-25 15:48:57 +08:00
CompositeTokenGranter <-- ResourceOwnerPasswordTokenGranter: OAuth2Authentication
2022-03-20 23:53:34 +08:00
TokenEndpoint <-- CompositeTokenGranter:OAuth2AccessToken
AuthController <-- TokenEndpoint:OAuth2AccessToken
客户端 <-- AuthController: OAuth2AccessToken
@enduml