Package io.helidon.security
Class Principal.Builder
- java.lang.Object
-
- io.helidon.security.Principal.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Principal.Builder
addAttribute(String key, Object value)
Add a custom attribute to this principal.Principal
build()
Build the instance from this builder.Principal.Builder
id(String id)
Principal id.Principal.Builder
name(String name)
Principal name.
-
-
-
Method Detail
-
build
public Principal build()
Description copied from interface:Builder
Build the instance from this builder.
-
name
public Principal.Builder name(String 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
public Principal.Builder id(String 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
public Principal.Builder addAttribute(String key, Object value)
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
-
-