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
ConstructorsConstructorDescriptionAmazonS3OAuthStateService
(String bucketName) AmazonS3OAuthStateService
(String bucketName, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) AmazonS3OAuthStateService
(String bucketName, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider, software.amazon.awssdk.regions.Region region, String endpointOverride) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNewStateToDatastore
(String state) Adds a newly generated state value to the server-side datastore.protected software.amazon.awssdk.auth.credentials.AwsCredentials
createCredentials
(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider provider) protected software.amazon.awssdk.services.s3.S3Client
void
deleteStateFromDatastore
(String state) Deletes a given state value from the server-side datastore.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
-
AmazonS3OAuthStateService
public AmazonS3OAuthStateService(String bucketName, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) -
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
-
createCredentials
protected software.amazon.awssdk.auth.credentials.AwsCredentials createCredentials(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider provider) -
createS3Client
protected software.amazon.awssdk.services.s3.S3Client createS3Client()
-