Changes between Version 8 and Version 9 of udg/ecoms/RPackage/authentication


Ignore:
Timestamp:
Feb 14, 2014 1:31:01 PM (8 years ago)
Author:
juaco
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • udg/ecoms/RPackage/authentication

    v8 v9  
    11== Authentication
    22
    3 The SPECS-EUPORIAS Data Portal is based on a password-protected THREDDS data server providing metadata and data access to a set of geo-referenced atmospheric variables using OPeNDAP and other remote data access protocols. Therefore, before accessing the data, authentication is required at the SPECS-EUPORIAS Data Portal. To this aim, user's must be registered and activate their role as EUPORIAS/SPECS users, following [wiki:EcomsUdg/DataServer/Registration these steps].
     3The '''ECOMS-UDG''' is based on a password-protected THREDDS using OPeNDAP and other remote data access protocols. Therefore, before accessing the data, authentication is required. To this aim, user's must be registered and activate the required roles, as described in the [wiki:EcomsUdg/DataServer/Registration Registration section].
    44
    5 Once registered as users, the registration within the R session can be easily accomplished assuming that we already have a valid username, role and password. To this aim, in the following lines we illustrate how to proceed using the R-to-Java interface provided by the package `rJava` (For more information on the authentication procedure click on [http://www.unidata.ucar.edu/software/netcdf-java/v4.3/javadocAll/ucar/nc2/util/net/HTTPBasicProvider.html the help page]).
     5Once registered as users, the registration within the R session can be easily accomplished assuming that we already have a valid username, role and password, with a simple call to the function `loginECOMS_UDG`, providing HTPP authentication:
    66
     7{{{#!comment  To this aim, in the following lines we illustrate how to proceed using the R-to-Java interface provided by the package `rJava` (For more information on the authentication procedure click on [http://www.unidata.ucar.edu/software/netcdf-java/v4.3/javadocAll/ucar/nc2/util/net/HTTPBasicProvider.html the help page]).
     8}}}
    79
    810{{{
    911> username <- "myUsername" # This is a character string with the username
    1012> password <- "myPassword" # This is a character string with the password
    11 > aux <- .jnew("ucar/nc2/util/net/HTTPBasicProvider", username, password)
    12 > J("ucar.nc2.util.net.HTTPSession")$setGlobalCredentialsProvider(aux)
    13 
     13> loginECOMS_UDG("myUsername", "myPassword")
    1414}}}
    15 
    16 
    17 == IMPORTANT: proxy server connections
    1815
    1916In case the connection is performed via a proxy, it is necessary to set up the proxy prior to the authentication step, in order to connect to the server.
     
    2219> proxyHost <- "proxy.host.com" # Your institution Proxy configuration: host
    2320> proxyPort <- as.integer(1234) # and port
    24 > J("ucar.nc2.util.net.HTTPSession")$setGlobalProxy(proxyHost,proxyPort)
    25 
     21> loginECOMS_UDG("myUsername", "myPassword", proxy.host = proxyHost, proxy.port = proxyPort)
    2622}}}
    2723