Home | History | Annotate | Download | only in auth

Lines Matching defs:Subject

41  * authenticated user or entity (both referred to as "subject"). IT defines also
43 * to the subject's permissions.
45 * A subject has the following features:
48 * {@code Subject} that distinguish it.</li>
53 public final class Subject implements Serializable {
91 public Subject() {
100 * The constructor for the subject, setting its public and private
104 * {@code true} if this {@code Subject} is read-only, thus
108 * Subject}.
111 * Subject}.
114 * Subject}.
116 public Subject(boolean readOnly, Set<? extends Principal> subjPrincipals,
136 * the {@code Subject} itself and to the code as well.
138 * @param subject
139 * the distinguished {@code Subject}.
145 public static <T> T doAs(Subject subject, PrivilegedAction<T> action) {
146 return doAs_PrivilegedAction(subject, action, AccessController.getContext());
151 * the {@code Subject} and to the code itself, additionally providing a more
154 * @param subject
155 * the distinguished {@code Subject}.
165 public static <T> T doAsPrivileged(Subject subject, PrivilegedAction<T> action,
168 return doAs_PrivilegedAction(subject, action, new AccessControlContext(
171 return doAs_PrivilegedAction(subject, action, context);
176 private static <T> T doAs_PrivilegedAction(Subject subject, PrivilegedAction<T> action,
182 if (subject == null) {
184 // if subject is null there is nothing to combine
187 combiner = new SubjectDomainCombiner(subject);
203 * the subject and to the code itself.
205 * @param subject
206 * the distinguished {@code Subject}.
214 public static <T> T doAs(Subject subject, PrivilegedExceptionAction<T> action)
216 return doAs_PrivilegedExceptionAction(subject, action, AccessController.getContext());
221 * the subject and to the code itself, additionally providing a more
224 * @param subject
225 * the distinguished {@code Subject}.
237 public static <T> T doAsPrivileged(Subject subject,
241 return doAs_PrivilegedExceptionAction(subject, action,
244 return doAs_PrivilegedExceptionAction(subject, action, context);
249 private static <T> T doAs_PrivilegedExceptionAction(Subject subject,
256 if (subject == null) {
258 // if subject is null there is nothing to combine
261 combiner = new SubjectDomainCombiner(subject);
282 * Subject}.
283 * @return {@code true} if the specified {@code Subject} is equal to this
297 Subject that = (Subject) obj;
308 * Returns this {@code Subject}'s {@link Principal}.
310 * @return this {@code Subject}'s {@link Principal}.
318 * Returns this {@code Subject}'s {@link Principal} which is a subclass of
324 * @return this {@code Subject}'s {@link Principal}. Modifications to the
326 * Subject}'s set.
333 * Returns the private credentials associated with this {@code Subject}.
335 * @return the private credentials associated with this {@code Subject}.
342 * Returns this {@code Subject}'s private credentials which are a subclass
348 * @return this {@code Subject}'s private credentials. Modifications to the
349 * returned set of credentials do not affect this {@code Subject}'s
357 * Returns the public credentials associated with this {@code Subject}.
359 * @return the public credentials associated with this {@code Subject}.
367 * Returns this {@code Subject}'s public credentials which are a subclass of
373 * @return this {@code Subject}'s public credentials. Modifications to the
374 * returned set of credentials do not affect this {@code Subject}'s
382 * Returns a hash code of this {@code Subject}.
384 * @return a hash code of this {@code Subject}.
394 * Principal} sets. After setting it to read-only this {@code Subject} can
403 * Returns whether this {@code Subject} is read-only or not.
405 * @return whether this {@code Subject} is read-only or not.
412 * Returns a {@code String} representation of this {@code Subject}.
414 * @return a {@code String} representation of this {@code Subject}.
418 StringBuilder buf = new StringBuilder("Subject:\n");
463 * Returns the {@code Subject} that was last associated with the {@code
468 * {@code Subject}.
469 * @return the {@code Subject} that was last associated with the {@code
472 public static Subject getSubject(final AccessControlContext context) {
545 // Subject's constructor receives a Set, we can trusts if a set is from bootclasspath,
717 * Represents iterator for subject's secure set