org.glassfish.jersey.client.oauth1
Class ConsumerCredentials

java.lang.Object
  extended by org.glassfish.jersey.client.oauth1.ConsumerCredentials

public final class ConsumerCredentials
extends Object

Consumer credentials class (credentials issued by the Service Provider for the application). The class stores client secret as byte array to improve security.

Since:
2.3
Author:
Miroslav Fuksa (miroslav.fuksa at oracle.com)

Constructor Summary
ConsumerCredentials(String consumerKey, byte[] consumerSecret)
          Create a new consumer credentials with secret defined as byte array.
ConsumerCredentials(String consumerKey, String consumerSecret)
          Create new consumer credentials.
 
Method Summary
 String getConsumerKey()
          Get consumer key.
 String getConsumerSecret()
          Get consumer secret.
 byte[] getConsumerSecretAsByteArray()
          Get consumer secret as a byte array (in default encoding).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerCredentials

public ConsumerCredentials(String consumerKey,
                           String consumerSecret)
Create new consumer credentials.

Parameters:
consumerKey - Consumer key.
consumerSecret - Consumer secret.

ConsumerCredentials

public ConsumerCredentials(String consumerKey,
                           byte[] consumerSecret)
Create a new consumer credentials with secret defined as byte array.

Parameters:
consumerKey - Consumer key.
consumerSecret - Consumer secret as byte array.
Method Detail

getConsumerKey

public String getConsumerKey()
Get consumer key.

Returns:
Consumer key.

getConsumerSecret

public String getConsumerSecret()
Get consumer secret.

Returns:
Consumer secret.

getConsumerSecretAsByteArray

public byte[] getConsumerSecretAsByteArray()
Get consumer secret as a byte array (in default encoding).

Returns:
Consumer secret.


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.