# springcloudalibaba-oauth2 **Repository Path**: fafi09/springcloudalibaba-oauth2 ## Basic Information - **Project Name**: springcloudalibaba-oauth2 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-29 - **Last Updated**: 2021-06-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 授权服务 1. 授权码模式 http://localhost:53020/uaa/oauth/authorize?client_id=c1&response_type=code&scope=all&redirect_uri=http://www.baidu.com 2. 密码模式 http://localhost:53020/uaa/oauth/token?client_id=c1&client_secret=secret&grant_type=password&username=smith&password=123 必须是post模式 3. 客户端模式 http://localhost:53020/uaa/oauth/token?client_id=c1&client_secret=secret&grant_type=client_credentials post模式 4. 授权服务改造非对称加密 keytool -genkey -alias dsecurity -keyalg RSA -keypass 123456 -keystore dsecurity.jks -storepass 123456 5. *.jks访问不到 修改pom文件 false ### 资源验证 1. http://localhost:53021/order/r1 postman验证必须在header中Authorization bearer token值 2. 栈调用 > lambda$authenticate$5:115, AuthenticationWebFilter (org.springframework.security.web.server.authentication) > authenticate:55, JwtReactiveAuthenticationManager (org.springframework.security.oauth2.server.resource.authentication) > decode:139, NimbusReactiveJwtDecoder (org.springframework.security.oauth2.jwt) > convert:38, JwtAuthenticationConverter (org.springframework.security.oauth2.server.resource.authentication) > convert:56, JwtGrantedAuthoritiesConverter (org.springframework.security.oauth2.server.resource.authentication) > getAuthorities:102, JwtGrantedAuthoritiesConverter (org.springframework.security.oauth2.server.resource.authentication) > check:35, AuthorizationManager (com.itheima.safe.gateway.security) > filter:43, AuthGlobalFilter (com.itheima.safe.gateway.filter)