public static synchronized STSSessionCredentialsProvider getSessionCredentialsProvider ( AWSCredentials longTermCredentials , String serviceEndpoint , ClientConfiguration stsClientConfiguration ) { Key key = new Key ( longTermCredentials . getAWSAccessKeyId ( ) , serviceEndpoint ) ; if ( ! cache . containsKey ( key ) ) { cache . put ( key , new STSSessionCredentialsProvider ( longTermCredentials , stsClientConfiguration ) ) ; } return cache . get ( key ) ; }
Gets a session credentials provider for the long - term credentials and service endpoint given . These are shared globally to support reuse of session tokens .