Skip to content

Commit

Permalink
Add "enabled" property.
Browse files Browse the repository at this point in the history
  • Loading branch information
rujche committed Nov 18, 2021
1 parent b784747 commit f55a5de
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ spring:
azure:
active-directory:
b2c:
enabled: true
tenant-id: ${your-tenant-id}
app-id-uri: ${your-app-id-uri} # If you are using v1.0 token, please configure app-id-uri for `aud` verification
client-id: ${your-client-id} # If you are using v2.0 token, please configure client-id for `aud` verification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ spring:
azure:
active-directory:
b2c:
enabled: true
tenant-id: ${your-tenant-id}
app-id-uri: ${your-app-id-uri} # If you are using v1.0 token, please configure app-id-uri for `aud` verification
client-id: ${your-client-id} # If you are using v2.0 token, please configure client-id for `aud` verification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Follow the guide of [AAD B2C user flows creation](https://docs.microsoft.com/azu
1. Fill in `${your-tenant-authorization-server-base-uri}` from **Azure AD B2C** portal `App registrations` blade, select **Endpoints**, copy the base endpoint uri(Global cloud format may looks like
`https://{your-tenant-name}.b2clogin.com/{your-tenant-name}.onmicrosoft.com`, China Cloud looks like `https://{your-tenant-name}.b2clogin.cn/{your-tenant-name}.partner.onmschina.cn`).

**NOTE**: The `spring.cloud.azure.active-directoryb2c.tenant` has been deprecated. Please use `spring.cloud.azure.active-directoryb2c.base-uri` instead.
**NOTE**: The `spring.cloud.azure.active-directory.b2c.tenant` has been deprecated. Please use `spring.cloud.azure.active-directory.b2c.base-uri` instead.

2. Select one registered instance under `Applications` from portal, and then:
1. Fill in `${your-client-id}` from `Application ID`.
Expand All @@ -54,6 +54,7 @@ spring:
azure:
active-directory:
b2c:
enabled: true
base-uri: ${your-tenant-authorization-server-base-uri}
client-id: ${your-client-id}
client-secret: ${your-client-secret}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ spring:
azure:
active-directory:
b2c:
enabled: true
base-uri: ${your-tenant-authorization-server-base-uri}
client-id: ${your-client-id}
client-secret: ${your-client-secret}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ Furthermore enable the implicit flow in the manifest for the demo application
You have to activate the stateless app-role auth filter and configure the `client-id`of your application registration:

```properties
spring.cloud.azure.active-directorysession-stateless=true
spring.cloud.azure.active-directoryclient-id=xxxxxx-your-client-id-xxxxxx
spring.cloud.azure.active-directoryappIdUri=xxxxxx-your-appIDUri-xxxxxx
spring.cloud.azure.active-directory.enabled=true
spring.cloud.azure.active-directory.session-stateless=true
spring.cloud.azure.active-directory.client-id=xxxxxx-your-client-id-xxxxxx
spring.cloud.azure.active-directory.appIdUri=xxxxxx-your-appIDUri-xxxxxx
```

#### Configure Webapp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# By default, spring.cloud.azure.active-directoryenvironment property has value `global`,
# By default, spring.cloud.azure.active-directory.environment property has value `global`,
# supported value is global, cn. Please refer to the README for details.
# spring.cloud.azure.active-directoryenvironment=global
spring.cloud.azure.active-directorysession-stateless=true
spring.cloud.azure.active-directoryclient-id=xxxxxx-your-client-id-xxxxxx
spring.cloud.azure.active-directoryappIdUri=xxxxxx-your-appIDUri-xxxxxx
# spring.cloud.azure.active-directory.environment=global
spring.cloud.azure.active-directory.enabled=true
spring.cloud.azure.active-directory.session-stateless=true
spring.cloud.azure.active-directory.client-id=xxxxxx-your-client-id-xxxxxx
spring.cloud.azure.active-directory.appIdUri=xxxxxx-your-appIDUri-xxxxxx

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ spring:
cloud:
azure:
active-directory:
enabled: true
tenant-id: <your-tenant-id>
client-id: <your-client-id>
client-secret: <your-client-secret>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# By default, spring.cloud.azure.active-directoryenvironment property has value `global`,
# By default, spring.cloud.azure.active-directory.environment property has value `global`,
# supported value is global, cn. Please refer to the README for details.
# spring.cloud.azure.active-directoryenvironment=global
# spring.cloud.azure.active-directory.environment=global
spring:
cloud:
azure:
active-directory:
enabled: true
tenant-id: <your-tenant-id>
client-id: <your-client-id>
client-secret: <your-client-secret>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ spring:
cloud:
azure:
active-directory:
enabled: true
client-id: <Web-API-A-client-id>
client-secret: <Web-API-A-client-secret>
tenant-id: <Tenant-id-registered-by-application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ spring:
cloud:
azure:
active-directory:
enabled: true
client-id: <Web-API-A-client-id>
client-secret: <Web-API-A-client-secret>
tenant-id: <Tenant-id-registered-by-application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ See [Expose scoped permission to web api] for more information about web api.
## Examples
### Configure application.yml
```yaml
#If we configure the spring.cloud.azure.active-directoryclient-id or spring.cloud.azure.active-directoryapp-id-uri will be to check the audience.
#If we configure the spring.cloud.azure.active-directory.client-id or spring.cloud.azure.active-directory.app-id-uri will be to check the audience.
#In v2.0 tokens, this is always client id of the app, while in v1.0 tokens it can be the client id or the application id url used in the request.
#If you are using v1.0 tokens, configure both to properly complete the audience validation.

spring:
cloud:
azure:
active-directory:
enabled: true
client-id: <client-id>
app-id-uri: <app-id-uri>
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# If we configure the spring.cloud.azure.active-directoryclient-id or spring.cloud.azure.active-directoryapp-id-uri will be to check the audience.
# If we configure the spring.cloud.azure.active-directory.client-id or spring.cloud.azure.active-directory.app-id-uri will be to check the audience.
# In v2.0 tokens, this is always the client ID of the API, while in v1.0 tokens it can be the client ID or the resource URI used in the request.
# If you are using v1.0 tokens, configure both to properly complete the audience validation.

Expand All @@ -9,6 +9,7 @@ spring:
cloud:
azure:
active-directory:
enabled: true
tenant-id: ${your-tenant-id}
# client-id: ${your-client-id}
# app-id-uri: ${your-app-id-uri}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ spring:
cloud:
azure:
active-directory:
enabled: true
client-id: <client-id>
client-secret: <client-secret>
tenant-id: <tenant-id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ spring:
cloud:
azure:
active-directory:
enabled: true
client-id: <client-id>
client-secret: <client-secret>
tenant-id: <tenant-id>
Expand Down Expand Up @@ -135,6 +136,7 @@ spring:
cloud:
azure:
active-directory:
enabled: true
tenant-id: common
```
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ spring:
cloud:
azure:
active-directory:
enabled: true
client-id: <client-id>
client-secret: <client-secret>
tenant-id: <tenant-id>
Expand Down

0 comments on commit f55a5de

Please sign in to comment.