Class AmazonS3OAuthStateService
java.lang.Object
com.slack.api.bolt.service.builtin.AmazonS3OAuthStateService
- All Implemented Interfaces:
OAuthStateService
,Service
OAuthStateService implementation using Amazon S3.
- See Also:
-
Field Summary
Fields inherited from interface com.slack.api.bolt.service.OAuthStateService
DEFAULT_EXPIRATION_IN_SECONDS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNewStateToDatastore
(String state) Adds a newly generated state value to the server-side datastore.protected com.amazonaws.services.s3.AmazonS3
void
deleteStateFromDatastore
(String state) Deletes a given state value from the server-side datastore.protected com.amazonaws.auth.AWSCredentials
Returns the initializer for this service.boolean
isAvailableInDatabase
(String state) Verifies the state value is available in the datastore and returns true if it's valid.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.slack.api.bolt.service.OAuthStateService
consume, extractStateFromQueryString, extractStateFromSession, generateNewStateValue, generateSessionCookieValue, getExpirationInSeconds, getSessionCookieName, issueNewState, isValid
-
Constructor Details
-
AmazonS3OAuthStateService
-
-
Method Details
-
initializer
Description copied from interface:Service
Returns the initializer for this service. If the service has time-consuming initialization steps, putting those into this function would be a good way to avoid timeout errors for the first incoming request (in other words, to avoid cold-start problems).- Specified by:
initializer
in interfaceService
-
addNewStateToDatastore
Description copied from interface:OAuthStateService
Adds a newly generated state value to the server-side datastore.- Specified by:
addNewStateToDatastore
in interfaceOAuthStateService
- Throws:
Exception
-
isAvailableInDatabase
Description copied from interface:OAuthStateService
Verifies the state value is available in the datastore and returns true if it's valid.- Specified by:
isAvailableInDatabase
in interfaceOAuthStateService
-
deleteStateFromDatastore
Description copied from interface:OAuthStateService
Deletes a given state value from the server-side datastore.- Specified by:
deleteStateFromDatastore
in interfaceOAuthStateService
- Throws:
Exception
-
getCredentials
protected com.amazonaws.auth.AWSCredentials getCredentials() -
createS3Client
protected com.amazonaws.services.s3.AmazonS3 createS3Client()
-