/** * Creates a new instance of the DelegatedTokenCredentials from an auth file. * * @param authFile The credentials based on the file * @param redirectUrl the URL to redirect to after authentication in Active Directory * @return a new delegated token credentials * @throws IOException exception thrown from file access errors. */ public static DelegatedTokenCredentials fromFile(File authFile, String redirectUrl) throws IOException { return new DelegatedTokenCredentials(ApplicationTokenCredentials.fromFile(authFile), redirectUrl); }
/** * Creates a new instance of the DelegatedTokenCredentials from an auth file, * with a pre-acquired oauth2 authorization code. * * @param authFile The credentials based on the file * @param redirectUrl the URL to redirect to after authentication in Active Directory * @param authorizationCode the oauth2 authorization code * @return a new delegated token credentials * @throws IOException exception thrown from file access errors. */ public static DelegatedTokenCredentials fromFile(File authFile, String redirectUrl, String authorizationCode) throws IOException { return new DelegatedTokenCredentials(ApplicationTokenCredentials.fromFile(authFile), redirectUrl, authorizationCode); }