Skip navigation links

HERE OAuth Client 0.4.23 API

The HERE Account OAuth Client SDK is a general purpose Java client library for the OAuth1.0 and OAuth2.0 standard specifications.

See: Description

Packages 
Package Description
com.here.account.auth
General purpose utility classes for providing OAuth1.0 and OAuth2.0 credentials.
com.here.account.auth.provider
Provider classes to pull credentials from different sources like system properties, ini and properties file and in an order of priority specified.
com.here.account.auth.provider.incubator  
com.here.account.client
A general purpose client class that talks to a Resource Server, in OAuth2-speak.
com.here.account.http
A pluggable HTTP abstraction used by the HERE Account client.
com.here.account.http.apache
An Apache HTTP Client Implementation of com.here.account.http.
com.here.account.http.java
A Java Implementation of com.here.account.http.
com.here.account.identity.bo  
com.here.account.oauth2
An OAuth2.0 compliant client library for use against HERE Account services.
com.here.account.oauth2.bo  
com.here.account.oauth2.retry  
com.here.account.olp  
com.here.account.util
HERE Account utility classes.

The HERE Account OAuth Client SDK is a general purpose Java client library for the OAuth1.0 and OAuth2.0 standard specifications.

To use your provided credentials.properties to get a one-time use token:

   
        // use your provided credentials.properties
        TokenEndpoint tokenEndpoint = HereAccount.getTokenEndpoint(
                ApacheHttpClientProvider.builder().build(), 
                new OAuth1ClientCredentialsProvider.FromFile(new File("credentials.properties")));
        
        String hereAccessToken = tokenEndpoint.requestToken(
                new ClientCredentialsGrantRequest()).getAccessToken();
        // use hereAccessToken on requests until expires...
   
   

See the HereAccount entry point class for detailed usage instructions.

To use your credentials in system properties, credentials.ini file or credentials.properties in that order, and get a token:

          
             HereAccessTokenProvider accessTokens = HereAccessTokenProvider.builder().build()
             String accessToken = accessTokens.getAccessToken();

            
        

See the HereAccessTokenProvider entry point class for detailed usage instructions.

Skip navigation links

Copyright © 2021 HERE Europe B.V. All Rights Reserved.