Share via


rxOAuthParameters: OAuth2 Token request

Description

Method to create parameter list to be used for getting an OAuth2 token.

Usage

      rxOAuthParameters(authUri = NULL, tenantId = NULL, clientId = NULL, resource = NULL, username = NULL, password = NULL, authToken= NULL, useWindowsAuth = FALSE)


Arguments

authUri

Optional string containing OAuth Authentication URI - default NULL

tenantId

Optional string containing OAuth Tenant ID - default NULL

clientId

Optional string containing OAuth ClientID - default NULL

resource

Optional string containing OAuth Resource - default NULL

username

Optional string containing OAuth Username - default NULL

password

Optional string containing OAuth Password - default NULL

authToken

Optional string containing a valid OAuth token to be used for WebHdfs requests - default NULL

useWindowsAuth

Optional Flag indicating if Windows Authentication should be used for obtaining the OAuth token (applicable only on Windows) - default NULL

Details

Reading from HDFS file system via WebHdfs can only be done by first obtaining a OAuth2 token. This function allows the specification of parameters that can be set to retreive a token.

Value

An rxOAuthParameters list object. This object may be used in RxHdfsFileSystem to set the OAuth request method for WebHdfs usage.

Author(s)

Microsoft Corporation Microsoft Technical Support

See Also

RxHdfsFileSystem

Examples


 # Setup to run analyses to use HDFS with access via WebHdfs and OAuth2
 ## Not run:

oAuth <- rxOAuthParameters(authUri = "https://login.windows.net/",
           tenantId = "mytest.onmicrosoft.com",
           clientId = "00001111-aaaa-2222-bbbb-3333cccc4444", 
           resource = "https://KonaCompute.net/", 
           username = "me@mytest.onmicrosoft.com", 
           password = "password")

myHdfsFileSystem <- RxHdfsFileSystem(hostName = "myHost", port = 443, useWebHdfs = TRUE, oAuthParameters = oAuth)
rxSetFileSystem(fileSystem = myHdfsFileSystem )
## End(Not run)