|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
27 | 27 | public enum CompositeProviderFlag {
|
28 | 28 | /**
|
29 | 29 | * Provider may fail, nothing happens if it does.
|
| 30 | + * <p> |
| 31 | + * If succeeds, continues to the next provider. |
| 32 | + * To create a provider that may fail, yet that is sufficient, |
| 33 | + * please configure the flag to be {@link #SUFFICIENT}, and set the provider itself to be optional |
| 34 | + * (most Helidon providers support {@code optional} configuration option), so the provider abstains instead of fails |
| 35 | + * when user cannot be authenticated using it. |
30 | 36 | */
|
31 | 37 | MAY_FAIL(EnumSet.of(SecurityResponse.SecurityStatus.SUCCESS,
|
32 | 38 | SecurityResponse.SecurityStatus.ABSTAIN,
|
33 | 39 | SecurityResponse.SecurityStatus.FAILURE)),
|
34 | 40 | /**
|
35 | 41 | * If succeeds, no further providers are called, otherwise same as optional.
|
| 42 | + * <p> |
| 43 | + * To create a provider that may fail, yet that is sufficient, |
| 44 | + * use this flag, and set the provider itself to be optional |
| 45 | + * (most Helidon providers support {@code optional} configuration option), so the provider abstains instead of fails |
| 46 | + * when user cannot be authenticated using it. |
36 | 47 | */
|
37 | 48 | SUFFICIENT(EnumSet.of(SecurityResponse.SecurityStatus.SUCCESS, SecurityResponse.SecurityStatus.ABSTAIN)),
|
38 | 49 | /**
|
|
0 commit comments