Class OAuthSoapTokenGenerator


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

      • OAuthSoapTokenGenerator

        public OAuthSoapTokenGenerator()
    • Method Detail

      • 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