public interface LoginTokensHelper
LoginTokens.| Modifier and Type | Method and Description | 
|---|---|
Object | 
authenticate(String username,
            String password,
            Class<?> loginClass,
            Object loginService)
Authenticates against the DFA API. 
 | 
Class<?> | 
getLoginClass(String stubPackage)
Retrieves the  
Class object representing the login service. | 
Object | 
getLoginService(DfaSession session,
               Class<?> loginClass)
Returns a  
DfaServiceClient wrapping the login service. | 
Class<?> | 
getUserProfileClass(String stubPackage)
Retrieves the  
Class object representing user profiles. | 
String | 
retrieveToken(Object userProfile)
Retrieves the user's authentication token from the  
UserProfile
 returned by the DFA API. | 
Class<?> getLoginClass(String stubPackage) throws ClassNotFoundException
Class object representing the login service.stubPackage - the package where all generated stubs are locatedClass object representing the login serviceClassNotFoundException - if the class cannot be resolvedClass<?> getUserProfileClass(String stubPackage) throws ClassNotFoundException
Class object representing user profiles.stubPackage - the package where all generated stubs are locatedClass object representing user profilesClassNotFoundException - if the class cannot be resolvedObject getLoginService(DfaSession session, Class<?> loginClass)
DfaServiceClient wrapping the login service.session - the DFA sessionloginClass - the Class type of the login serviceObject authenticate(String username, String password, Class<?> loginClass, Object loginService) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
username - the usernamepassword - the passwordloginClass - the Class type of the login serviceloginService - a service client object wrapping the login serviceUserProfile response from the APIIllegalArgumentException - if one of the arguments used in
     authenticating is not allowedIllegalAccessException - if the authenticate method cannot be
     accessedInvocationTargetException - if an error occurs while invoking the
     authenticate methodNoSuchMethodException - if the authenticate method cannot be
     locatedString retrieveToken(Object userProfile) throws ClassNotFoundException, InvocationTargetException, NoSuchMethodException, IllegalAccessException
UserProfile
 returned by the DFA API.userProfile - the UserProfile object returned by the APIClassNotFoundException - if the UserProfile class cannot be
     locatedInvocationTargetException - if an error occurs while invoking
     getToken on the given objectNoSuchMethodException - if the getToken method cannot be
     found.IllegalAccessException - if the getToken method cannot be
     accessed.Copyright © 2015. All Rights Reserved.