Skip navigation links

Oracle Fusion Middleware Java API Reference for the Oracle Access Management OAuth Service
11g Release 2 Patch Set 3 (11.1.2.3)

E59498-01


oracle.security.idaas.oauth.sdk
Class OracleUserCredentials

java.lang.Object
  extended by oracle.security.idaas.oauth.sdk.OracleUserCredentials


public class OracleUserCredentials
extends java.lang.Object

Encapsulates the user ID and password management.


Constructor Summary

OracleUserCredentials(java.lang.String payload)
          Initiates the user information using the given json formatted payload.
OracleUserCredentials(java.lang.String userId, java.lang.String password)
          Initiates the user information using the given ID and password.

  Method Summary

 java.lang.String getCredentials()
          The Based64 formatted credentials corresponding to this user Id and password.
 java.lang.String getJson()
          Returns the json representation of the user credentials.
 java.lang.String getPassword()
          Returns the password.
 java.lang.String getUserId()
          Returns the user Id.
 void setJson(java.lang.String json)
          Changes the user credentials.
 void setPassword(java.lang.String password)
          Changes the user password and updates, when appropriated, the new credentials.
 void setUserId(java.lang.String userId)
          Changes the user Id and updates, when appropriated, the new credentials.
 java.lang.String toString()
           

  Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

OracleUserCredentials

public OracleUserCredentials(java.lang.String userId,
                             java.lang.String password)
                      throws java.io.UnsupportedEncodingException,
                             java.lang.IllegalArgumentException
Initiates the user information using the given ID and password. The user Id and the password shall not be null or empty.
Parameters:
userId - user identifier
password - of the user
Throws:
java.io.UnsupportedEncodingException - when encoding fails
java.lang.IllegalArgumentException - when invalid argument is provided

OracleUserCredentials

public OracleUserCredentials(java.lang.String payload)
                      throws java.io.UnsupportedEncodingException,
                             java.lang.IllegalArgumentException
Initiates the user information using the given json formatted payload.
Example:
  {"pin":"123"}
Parameters:
payload - json string
Throws:
java.io.UnsupportedEncodingException - when encoding fails
java.lang.IllegalArgumentException - when invalid argument is provided

Method Detail

getUserId

public java.lang.String getUserId()
Returns the user Id.
Returns:
id of the user

setUserId

public void setUserId(java.lang.String userId)
               throws java.io.UnsupportedEncodingException
Changes the user Id and updates, when appropriated, the new credentials. The user Id shall not be null or empty.
Parameters:
userId - user identifier
Throws:
java.io.UnsupportedEncodingException - when encoding fails

getJson

public java.lang.String getJson()
Returns the json representation of the user credentials.
Returns:
json string

setJson

public void setJson(java.lang.String json)
             throws java.io.UnsupportedEncodingException
Changes the user credentials.
Parameters:
json - formatted String
Throws:
java.io.UnsupportedEncodingException - when encoding fails
java.lang.IllegalArgumentException - when invalid json payload is provided

getPassword

public java.lang.String getPassword()
Returns the password.
Returns:
the password of the user

setPassword

public void setPassword(java.lang.String password)
                 throws java.io.UnsupportedEncodingException
Changes the user password and updates, when appropriated, the new credentials. The password shall not be null or empty.
Parameters:
password - of the user
Throws:
java.io.UnsupportedEncodingException - when encoding fails

getCredentials

public java.lang.String getCredentials()
The Based64 formatted credentials corresponding to this user Id and password.
Returns:
the formatted credentials

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Copyright (c) 2014, 2015,
Oracle and/or its affiliates. All Rights Reserved.