Package com.collabnet.ce.soap60.oauth

# Class OAuthSoapTokenGenerator

java.lang.Object
com.collabnet.ce.soap60.oauth.OAuthSoapTokenGenerator

@Dependent public class OAuthSoapTokenGenerator extends Object
OAuthSoapTokenGenerator generates OAuth tokens in soap layer. This acts as a facade around ctf oauth-support.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OAuthSoapTokenGenerator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `createAnonymousToken()`
  Creates anonymous oauth token
  `String`
  `generateToken(String username, String password, boolean ignorePasswordExpiry)`
  Generates oauth soap token using resource owner password grant type.

  ### Methods inherited from class java.lang.Object

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

- ## Constructor Details

  - ### OAuthSoapTokenGenerator

    public OAuthSoapTokenGenerator()

- ## Method Details

  - ### generateToken

    public String generateToken(String username, String password, boolean ignorePasswordExpiry) throws com.collabnet.ctf.idp.IdpException
    Generates oauth soap token using resource owner password grant type.
    Parameters:
      `username` - the user's username
      `password` - the user's password
      `ignorePasswordExpiry` - ignores password expiry check, if true; used only for "admin" user
    Returns:
      OAuth soap token
    Throws:
      `com.collabnet.ctf.idp.IdpException` - occurs when authenticating user with invalid credentials

  - ### createAnonymousToken

    public String createAnonymousToken() throws com.collabnet.ctf.idp.IdpException
    Creates anonymous oauth token
    Returns:
      anonymous oauth token
    Throws:
      `com.collabnet.ctf.idp.IdpException` - occurs when authenticating user with invalid credentials