Skip to content

Commit 5e3553a

Browse files
authored
Update documentation of composite provider flag. (helidon-io#6597) (helidon-io#6636)
* Update documentation of composite provider flag. (cherry picked from commit aba7c6e) Signed-off-by: Tomas Langer <[email protected]>
1 parent ca2b675 commit 5e3553a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

security/security/src/main/java/io/helidon/security/CompositeProviderFlag.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2023 Oracle and/or its affiliates.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,12 +27,23 @@
2727
public enum CompositeProviderFlag {
2828
/**
2929
* 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.
3036
*/
3137
MAY_FAIL(EnumSet.of(SecurityResponse.SecurityStatus.SUCCESS,
3238
SecurityResponse.SecurityStatus.ABSTAIN,
3339
SecurityResponse.SecurityStatus.FAILURE)),
3440
/**
3541
* 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.
3647
*/
3748
SUFFICIENT(EnumSet.of(SecurityResponse.SecurityStatus.SUCCESS, SecurityResponse.SecurityStatus.ABSTAIN)),
3849
/**

0 commit comments

Comments
 (0)