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 TypeMethodDescriptionvoidaddNewStateToDatastore(String state) Adds a newly generated state value to the server-side datastore.protected software.amazon.awssdk.auth.credentials.AwsCredentialscreateCredentials(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider provider) protected software.amazon.awssdk.services.s3.S3ClientvoiddeleteStateFromDatastore(String state) Deletes a given state value from the server-side datastore.Returns the initializer for this service.booleanisAvailableInDatabase(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, waitMethods 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:ServiceReturns 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:
initializerin interfaceService
-
addNewStateToDatastore
Description copied from interface:OAuthStateServiceAdds a newly generated state value to the server-side datastore.- Specified by:
addNewStateToDatastorein interfaceOAuthStateService- Throws:
Exception
-
isAvailableInDatabase
Description copied from interface:OAuthStateServiceVerifies the state value is available in the datastore and returns true if it's valid.- Specified by:
isAvailableInDatabasein interfaceOAuthStateService
-
deleteStateFromDatastore
Description copied from interface:OAuthStateServiceDeletes a given state value from the server-side datastore.- Specified by:
deleteStateFromDatastorein 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()
-