Class AmazonS3OAuthStateService

java.lang.Object
com.slack.api.bolt.service.builtin.AmazonS3OAuthStateService
All Implemented Interfaces:
OAuthStateService, Service

public class AmazonS3OAuthStateService extends Object implements OAuthStateService
OAuthStateService implementation using Amazon S3.
See Also:
  • Constructor Details

    • AmazonS3OAuthStateService

      public AmazonS3OAuthStateService(String bucketName)
  • Method Details

    • initializer

      public Initializer 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 interface Service
    • addNewStateToDatastore

      public void addNewStateToDatastore(String state) throws Exception
      Description copied from interface: OAuthStateService
      Adds a newly generated state value to the server-side datastore.
      Specified by:
      addNewStateToDatastore in interface OAuthStateService
      Throws:
      Exception
    • isAvailableInDatabase

      public boolean isAvailableInDatabase(String state)
      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 interface OAuthStateService
    • deleteStateFromDatastore

      public void deleteStateFromDatastore(String state) throws Exception
      Description copied from interface: OAuthStateService
      Deletes a given state value from the server-side datastore.
      Specified by:
      deleteStateFromDatastore in interface OAuthStateService
      Throws:
      Exception
    • getCredentials

      protected com.amazonaws.auth.AWSCredentials getCredentials()
    • createS3Client

      protected com.amazonaws.services.s3.AmazonS3 createS3Client()