Class Principal.Builder

    • Method Detail

      • build

        public Principal build()
        Description copied from interface: Builder
        Build the instance from this builder.
        Specified by:
        build in interface Builder<Principal>
        Returns:
        instance of the built type
      • 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 attribute
        value - value of the attribute, may be null (in that case the key is not added as an attribute)
        Returns:
        updated builder instance