Struchkov Mark
e730bf16b8
All checks were successful
continuous-integration/drone/push Build is passing
36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
---
|
|
tags:
|
|
- maturity/🌱
|
|
date:
|
|
- - 2023-11-20
|
|
zero-link:
|
|
- "[[../../../../../garden/ru/meta/zero/00 Снипеты для Java|00 Снипеты для Java]]"
|
|
parents:
|
|
linked:
|
|
- "[[../../../../../garden/ru/meta/zero/00 SpringBoot|00 SpringBoot]]"
|
|
article: https://note.struchkov.dev/mock-konfighuratsiia-dlia-oauth2-springboot/
|
|
---
|
|
Конфигурация для подключения к мок-сервису авторизации по auth2. Полезно при локальной разработке, чтобы не цепляться к настоящему Oauth2 серверу.
|
|
|
|
```yml
|
|
spring:
|
|
security:
|
|
oauth2:
|
|
client:
|
|
registration:
|
|
mocklab:
|
|
provider: mocklab
|
|
client-authentication-method: basic
|
|
authorization-grant-type: authorization_code
|
|
scope: profile, email
|
|
redirect-uri: http://localhost:8080/login/oauth2/code/
|
|
clientId: mocklab_oidc
|
|
clientSecret: whatever
|
|
provider:
|
|
mocklab:
|
|
authorization-uri: https://oauth.mocklab.io/oauth/authorize
|
|
token-uri: https://oauth.mocklab.io/oauth/token
|
|
user-info-uri: https://oauth.mocklab.io/userinfo
|
|
user-name-attribute: sub
|
|
jwk-set-uri: https://oauth.mocklab.io/.well-known/jwks.json
|
|
``` |