java.lang.Object
io.helidon.security.Principal.Builder
- All Implemented Interfaces:
Builder<Principal.Builder,
,Principal> Supplier<Principal>
- Enclosing interface:
- Principal
public static final class Principal.Builder
extends Object
implements Builder<Principal.Builder,Principal>
A fluent API builder for
Principal
.-
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(String key, Object value) Add a custom attribute to this principal.build()
Build the instance from this builder.Principal id.Principal name.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<Principal.Builder,
Principal> - Returns:
- instance of the built type
-
name
Principal name.- Parameters:
name
- name of the principal (e.g. "John Doe"), also used as id, unless explicitly defined- Returns:
- updated builder instance
-
id
Principal id.- Parameters:
id
- id of the principal (e.g. "oid-user-55d45d5sd4"), also used as name, unless explicitly defined- Returns:
- updated builder instance
-
addAttribute
Add a custom attribute to this principal.- Parameters:
key
- name of the attributevalue
- value of the attribute, may be null (in that case the key is not added as an attribute)- Returns:
- updated builder instance
-