Class DropboxTokenService

java.lang.Object
org.apache.clusterbr.zupportl5.service.dropbox.DropboxTokenService

@Service public class DropboxTokenService extends Object

UML Diagrams:

UML CLASS Diagram

UML USECASE Diagram

UML SEQ Diagram

UML ACTIVITY Diagram

Since:
2024-1108
Author:
arcbrth@gmail.com
  • Field Details

  • Constructor Details

    • DropboxTokenService

      @Autowired public DropboxTokenService(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedParameterJdbcTemplate, DatabaseSessionStore databaseSessionStore, SettingsService settingsService)
  • Method Details

    • getAuthorizationUrl

      public String getAuthorizationUrl()

      Entry end-point to initiate the Dropbox Authentication.

      http://APP-HOST-SERVER:PORT/api/dropbox/oauth2/callback

      If LOGIN success the RAW authorizationUrl generated by Dropbox will have below format:

      • https://www.dropbox.com/oauth2/authorize ─ The Dropbox OAuth2 authorization endpoint
      • ?response_type=code ─ Specifies that the response should include an authorization code
      • &redirect_uri=http://localhost:8989/api/dropbox/oauth2/callback ─ The URL to redirect to once the ADMIN/user grants or denies permission
      • &state=Dj3gdRlt3jIfAvL-UMcUKQ== ─ The UUID value generated in the AAP to maintain state between the request and callback
      • &client_id=ynakgz3ugz49a8l ─ The unique-identifier for the APP, as it was registered in Dropbox
    • getRefreshToken

      public String getRefreshToken(String code, String redirectUri)
    • saveSettings

      public void saveSettings(String idKey, String value, Long expiresAtLong, String expiresAtTimeStr)
    • getAccessTokenFromDBOrRequestNew

      public SettingsDto getAccessTokenFromDBOrRequestNew()
    • getRefreshTokenFromDatabase

      public SettingsDto getRefreshTokenFromDatabase()
    • getAccessTokenFromDatabase

      public SettingsDto getAccessTokenFromDatabase()
    • getTokenFromDatabase

      public SettingsDto getTokenFromDatabase(String tokenKey)