Code examples for Subject

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
49:	subject = new Subject(); 
-
52:	handler.addHandlerFactory(new ModelControllerClientOperationHandler(getController(), handler, subject)); 
Full Snippet Info
8
CodeRank
51:	return subject.getPrincipals(); 
Full Snippet Info
7
CodeRank
158:	module.initialize( 
-
165:	assertEquals(this.subject.getPrincipals().size(), 3); 
166:	assertEquals(TICKET, this.subject.getPrivateCredentials().iterator().next().toString()); 
-
170:	assertEquals(0, subject.getPrincipals().size()); 
171:	assertEquals(0, subject.getPrivateCredentials().size()); 
-
175:	module.initialize( 
-
187:	assertEquals(0, this.subject.getPrincipals().size()); 
188:	assertEquals(0, this.subject.getPrivateCredentials().size()); 
Full Snippet Info
7
CodeRank
48:	Set<Principal> principals = subject.getPrincipals(); 
-
52:	Set<Object> privateCredentials = subject.getPrivateCredentials(); 
Full Snippet Info
7
CodeRank
48:	Subject s = new Subject(); 
-
50:	assertTrue("Set of principal is not empty", s.getPrincipals().isEmpty()); 
51:	assertTrue("Set of private credentials is not empty", s.getPrivateCredentials().isEmpty()); 
52:	assertTrue("Set of public credentials is not empty", s.getPublicCredentials().isEmpty()); 
Full Snippet Info
7
CodeRank
94:	return Subject.doAs(subject, action); 
Full Snippet Info
7
CodeRank
95:	Subject subject = new Subject(false, principals, new HashSet<Object>(), new HashSet<Object>()); 
Full Snippet Info
7
CodeRank
38:	Subject subject = new Subject(); 
-
40:	return new Object[] { subject, subject.getPrincipals(), 
41:	subject.getPrivateCredentials(), subject.getPublicCredentials() }; 
Full Snippet Info
7
CodeRank
80:	Set<Principal> principals = subject.getPrincipals(); 
Full Snippet Info
7
CodeRank
98:	Set<Principal> principals = subject.getPrincipals(); 
Full Snippet Info
7
CodeRank
42:	this.subject.getPublicCredentials().add((Object)username); 
-
44:	this.subject.getPrivateCredentials().add((Object)password); 
Full Snippet Info
6
CodeRank
61:	loginModule.initialize(subject, callbackHandler, null, new HashMap()); 
-
140:	assertEquals("logout should have cleared Subject principals.", 0, subject.getPrincipals().size()); 
Full Snippet Info
6
CodeRank
41:	Set<Principal> principals = subject.getPrincipals(); 
Full Snippet Info
6
CodeRank
68:	Subject subject = new Subject(); 
-
70:	subject.getPrivateCredentials().add(cred); 
-
73:	subject.getPrincipals().add(nm); 
-
78:	subject.getPrincipals().add(nm); 
Full Snippet Info
6
CodeRank
96:	Subject subject = new Subject(); 
-
100:	lm.initialize( subject, callbackHandler, null, options ); 
-
107:	Set roles = subject.getPrincipals(JAASRole.class); 
Full Snippet Info
6
CodeRank
37:	// It is used in KerberosName#getShortName which is used in User constructor invoked by UserGroupInformation#getUGIFromSubject 
-
47:	 
48:	@Override 
Full Snippet Info
6
CodeRank
55:	Subject subject = new Subject(); 
-
71:	if (subject.getPrincipals().size() == 0) { 
Full Snippet Info
6
CodeRank
85:	if(!subject.isReadOnly()) { 
-
87:	if(addOnPrincipal != null) subject.getPrincipals().remove(addOnPrincipal); 
88:	subject.getPrincipals().removeAll(krb5Subject.getPrincipals()); 
89:	subject.getPublicCredentials().removeAll(krb5Subject.getPublicCredentials()); 
90:	subject.getPrivateCredentials().removeAll(krb5Subject.getPrivateCredentials()); 
Full Snippet Info
6
CodeRank
41:	Set<Principal> principals = subject.getPrincipals(); 
Full Snippet Info
6
CodeRank
53:	Subject subj = new Subject(); 
-
57:	subj.getPrincipals().add(kp); 
58:	subj.getPrivateCredentials().add(kk); 
-
60:	Subject.doAs(subj, new PrivilegedExceptionAction() { 
Full Snippet Info
6
CodeRank