| Modifier and Type | Method | Description |
|---|---|---|
Subject.Builder |
addAttribute(java.lang.String key,
java.lang.Object value) |
Add an attribute to this subject.
|
Subject.Builder |
addGrant(Grant grant) |
Add a grant to this subject.
|
Subject.Builder |
addPrincipal(Principal principal) |
Add a principal to the list of principals of this subject.
|
Subject.Builder |
addPrivateCredential(java.lang.Class<?> className,
java.lang.Object instance) |
Add a private credential to this subject.
|
Subject.Builder |
addPrivateCredential(java.lang.Object instance) |
Add a private credential to this subject to be bound under its class.
|
Subject.Builder |
addPublicCredential(java.lang.Class<?> className,
java.lang.Object instance) |
Add a public credential to this subject.
|
Subject.Builder |
addPublicCredential(java.lang.Object instance) |
Add a public credential to this subject to be bound under its class.
|
Subject.Builder |
attributes(AbacSupport attributes) |
Add all attributes to this subject.
|
Subject |
build() |
Build the instance from this builder.
|
Subject.Builder |
principal(Principal principal) |
Main principal of this subject.
|
Subject.Builder |
update(Subject subject) |
Update this builder with all security information from the
subject provided.
|
public Subject build()
Builderpublic Subject.Builder update(Subject subject)
subject - subject to copy information frompublic Subject.Builder principal(Principal principal)
principal - principal (e.g. a user or a service)public Subject.Builder addGrant(Grant grant)
grant - grant to add (e.g. a role, scope, permission etc.)public Subject.Builder addPublicCredential(java.lang.Class<?> className, java.lang.Object instance)
className - class of the credential (e.g. X509 certificate)instance - instance of the credentialpublic Subject.Builder addPublicCredential(java.lang.Object instance)
instance - instance of the credential, the class it will be bound to is obtained through instance.getClass()public Subject.Builder addPrivateCredential(java.lang.Class<?> className, java.lang.Object instance)
className - class of the credential (e.g. X509 certificate)instance - instance of the credentialpublic Subject.Builder addPrivateCredential(java.lang.Object instance)
instance - instance of the credential, the class it will be bound to is obtained through instance.getClass()public Subject.Builder attributes(AbacSupport attributes)
attributes - attributes with key/value pairspublic Subject.Builder addAttribute(java.lang.String key, java.lang.Object value)
key - name of the attributevalue - value of the attributepublic Subject.Builder addPrincipal(Principal principal)
principal(Principal) was not invoked prior to this method, it will also set the "main" principal.principal - principal to add to this subjectCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.