Class DropboxTokenService
java.lang.Object
org.apache.clusterbr.zupportl5.service.dropbox.DropboxTokenService
UML Diagrams:




- Since:
- 2024-1108
- Author:
- arcbrth@gmail.com
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDropboxTokenService(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedParameterJdbcTemplate, DatabaseSessionStore databaseSessionStore, SettingsService settingsService) -
Method Summary
Modifier and TypeMethodDescriptionEntry end-point to initiate the Dropbox Authentication.getRefreshToken(String code, String redirectUri) getTokenFromDatabase(String tokenKey) voidsaveSettings(String idKey, String value, Long expiresAtLong, String expiresAtTimeStr)
-
Field Details
-
MIN_REFRESH_TOKEN_SIZE
public static final int MIN_REFRESH_TOKEN_SIZE- See Also:
-
ACCESS_TOKEN_EXPIRATION_IN_MINUTES
public static final int ACCESS_TOKEN_EXPIRATION_IN_MINUTES- See Also:
-
NO_VALUE
- See Also:
-
TOKEN_SAVED_SUCCESSFULLY
- See Also:
-
DROPBOX_REFRESH_TOKEN_KEY
- See Also:
-
DROPBOX_ACCESS_TOKEN_01_KEY
- See Also:
-
DROPBOX_ACCESS_TOKEN_02_KEY
- See Also:
-
DROPBOX_CLIENT_ID_KEY
- See Also:
-
DROPBOX_CLIENT_SECRET_KEY
- See Also:
-
-
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
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
-
saveSettings
-
getAccessTokenFromDBOrRequestNew
-
getRefreshTokenFromDatabase
-
getAccessTokenFromDatabase
-
getTokenFromDatabase
-