Java Code Examples for org.apache.commons.lang3.builder.ReflectionToStringBuilder

The following are top voted examples for showing how to use org.apache.commons.lang3.builder.ReflectionToStringBuilder. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: kerberos-docker   File: KerberosTicketManager.java   View source code 5 votes vote down vote up
/**
 * Get a Ticket Granting Ticket (TGT) from Authentication Server (AS) with required keytab file.
 *
 * 1. Create and send AS-REQ
 * 2. Receive KRB ERROR (PRE-AUTH is mandatory in Kerberos v5)
 * 3. Re-send AS-REQ
 * 4. Receive AS-REP
 * 5. Return TGT credentials ticket in Java object
 *
 * @param keytabFileName Path file name to keytab (required already on disk storage, for instance
 *                       /etc/bob.keytab)
 * @param userName user name principal (UPN) (ex: [email protected])
 * @param realm Kerberos domain of the Authentication Server (ex: EXAMPLE.COM)
 * @return TGT credentials
 * @throws KrbException
 * @throws IOException
 *
 * Note: 
 * - For system administrator it is like the command: kinit -kt keytab upn 
 * - [WARNING] dependencies with internal proprietary API and may be removed in a future release
 */
public static Credentials getTGT(String keytabFileName, String userName, String realm)
    throws KrbException, IOException {

  KrbAsReqBuilder builder = null;
  try {

    PrincipalName userPrincipalName = new PrincipalName(userName);
    KeyTab keyTab = KeyTab.getInstance(new File(keytabFileName));
    builder = new KrbAsReqBuilder(userPrincipalName, keyTab);

    PrincipalName tgsPrincipalName = PrincipalName.tgsService(realm, realm);
    builder.setTarget(tgsPrincipalName);

    // see http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/default/src/share/classes/sun/security/krb5/KdcComm.java#l145
    // for default parameters (timeout, max retries ...)
    builder.action();

    Credentials tgtCredentials = builder.getCCreds();
    if (DEBUG) {
      System.out.println(">>>TGT credentials : " +
          ReflectionToStringBuilder.toString(tgtCredentials));
    }
    return tgtCredentials;

  } finally {

    if (builder != null) {
      builder.destroy();
    }

  }

}
 
Example 2
Project: generator-thundr-gae-react   File: BaseDto.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 3
Project: Spring-Security-Third-Edition   File: SignupForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 4
Project: Spring-Security-Third-Edition   File: Role.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 5
Project: Spring-Security-Third-Edition   File: CreateEventForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 6
Project: Spring-Security-Third-Edition   File: CreateEventForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 7
Project: Spring-Security-Third-Edition   File: SignupForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 8
Project: cmc-claim-store   File: Offer.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ourStyle());
}
 
Example 9
Project: Spring-Security-Third-Edition   File: Event.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 10
Project: Spring-Security-Third-Edition   File: Role.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 11
Project: Spring-Security-Third-Edition   File: Event.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 12
Project: Spring-Security-Third-Edition   File: CalendarUser.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 13
Project: Spring-Security-Third-Edition   File: CreateEventForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 14
Project: Spring-Security-Third-Edition   File: CalendarUser.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 15
Project: Spring-Security-Third-Edition   File: PersistentLogin.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 16
Project: Spring-Security-Third-Edition   File: CalendarUser.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 17
Project: cmc-claim-store   File: ToStringStyleTest.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ourStyle());
}
 
Example 18
Project: SDI   File: CreatorParams.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ToStringStyle.JSON_STYLE);
}
 
Example 19
Project: cmc-claim-store   File: ClaimIssuedEvent.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this, ourStyle());
}
 
Example 20
Project: Spring-Security-Third-Edition   File: CreateEventForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 21
Project: Spring-Security-Third-Edition   File: SignupForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 22
Project: Spring-Security-Third-Edition   File: SignupForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 23
Project: Spring-Security-Third-Edition   File: CalendarUser.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 24
Project: Spring-Security-Third-Edition   File: SignupForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 25
Project: Spring-Security-Third-Edition   File: CalendarUser.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 26
Project: spring-rest-commons-options   File: CollectionResources.java   View source code 4 votes vote down vote up
@Override
public String toString() {
	return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
}
 
Example 27
Project: Spring-Security-Third-Edition   File: CreateEventForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 28
Project: Spring-Security-Third-Edition   File: CalendarUser.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 29
Project: Spring-Security-Third-Edition   File: Event.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 30
Project: Spring-Security-Third-Edition   File: PersistentLogin.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 31
Project: Spring-Security-Third-Edition   File: Event.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 32
Project: Spring-Security-Third-Edition   File: CreateEventForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 33
Project: Spring-Security-Third-Edition   File: CalendarUser.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 34
Project: Spring-Security-Third-Edition   File: Event.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 35
Project: Spring-Security-Third-Edition   File: Role.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 36
Project: Spring-Security-Third-Edition   File: Role.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 37
Project: Spring-Security-Third-Edition   File: Event.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 38
Project: haystack-client-java   File: TextMapPropagator.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}
 
Example 39
Project: Spring-Security-Third-Edition   File: SignupForm.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.toString(this);
}
 
Example 40
Project: haystack-client-java   File: LogData.java   View source code 4 votes vote down vote up
@Override
public String toString() {
    return new ReflectionToStringBuilder(this, RecursiveToStringStyle.JSON_STYLE)
        .toString();
}