public Future < AuthenticationResult > acquireTokenByRefreshToken ( final String refreshToken , final String clientId , final String resource , final AuthenticationCallback callback ) { final ClientAuthentication clientAuth = new ClientAuthenticationPost ( ClientAuthenticationMethod . NONE , new ClientID ( clientId ) ) ; final AdalOAuthAuthorizationGrant authGrant = new AdalOAuthAuthorizationGrant ( new RefreshTokenGrant ( new RefreshToken ( refreshToken ) ) , resource ) ; return this . acquireToken ( authGrant , clientAuth , callback ) ; }
Acquires a security token from the authority using a Refresh Token previously received . This method is suitable for the daemon OAuth2 flow when a client secret is not possible .