com.google.api.ads.dfa.lib.auth
Class LoginTokens

java.lang.Object
  extended by com.google.api.ads.dfa.lib.auth.LoginTokens

public class LoginTokens
extends Object

A utility class that can authenticate against the DFA API and return authentication tokens.

Author:
Joseph DiLallo

Constructor Summary
LoginTokens(LoginTokensHelper loginTokensHelper)
          Constructor.
 
Method Summary
 String generateToken(String stubPackage, DfaSession session)
          Generates a new authentication token using reflection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginTokens

@Inject
public LoginTokens(LoginTokensHelper loginTokensHelper)
Constructor.

Parameters:
loginTokensHelper - the login ticket provider helper
Method Detail

generateToken

public String generateToken(String stubPackage,
                            DfaSession session)
                     throws LoginTokenException
Generates a new authentication token using reflection.

Parameters:
stubPackage - the package where all generated stubs are located
session - the DFA session
Returns:
an authentication token
Throws:
LoginTokenException - thrown if generating a token fails


Copyright © 2012. All Rights Reserved.