com.aliyun.oss.common.auth

## 类 STSAssumeRoleSessionCredentialsProvider

- java.lang.Object
- - com.aliyun.oss.common.auth.STSAssumeRoleSessionCredentialsProvider

- 所有已实现的接口:
    CredentialsProvider

      public class STSAssumeRoleSessionCredentialsProvider
      extends Object
      implements CredentialsProvider

  STSAssumeRoleSessionCredentialsProvider implementation that uses the STS Security Token Service to assume a Role and create temporary, short-lived sessions to use for authentication.

- - ### 构造器概要

    构造器
    构造器和说明
    `STSAssumeRoleSessionCredentialsProvider(com.aliyuncs.auth.AlibabaCloudCredentialsProvider longLivedCredentialsProvider, String roleArn, com.aliyuncs.profile.IClientProfile clientProfile)`
    `STSAssumeRoleSessionCredentialsProvider(com.aliyuncs.auth.AlibabaCloudCredentials longLivedCredentials, String roleArn, com.aliyuncs.profile.IClientProfile clientProfile)`

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `Credentials` | `getCredentials()`
    `static String` | `getNewRoleSessionName()`
    `void` | `setCredentials(Credentials creds)`
    `STSAssumeRoleSessionCredentialsProvider` | `withExpiredDuration(long expiredDurationSeconds)`
    `STSAssumeRoleSessionCredentialsProvider` | `withExpiredFactor(double expiredFactor)`
    `STSAssumeRoleSessionCredentialsProvider` | `withRoleSessionName(String roleSessionName)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### STSAssumeRoleSessionCredentialsProvider

          public STSAssumeRoleSessionCredentialsProvider(com.aliyuncs.auth.AlibabaCloudCredentials longLivedCredentials,
                                                 String roleArn,
                                                 com.aliyuncs.profile.IClientProfile clientProfile)

    - #### STSAssumeRoleSessionCredentialsProvider

          public STSAssumeRoleSessionCredentialsProvider(com.aliyuncs.auth.AlibabaCloudCredentialsProvider longLivedCredentialsProvider,
                                                 String roleArn,
                                                 com.aliyuncs.profile.IClientProfile clientProfile)

  - ### 方法详细资料

    - #### withRoleSessionName

          public STSAssumeRoleSessionCredentialsProvider withRoleSessionName(String roleSessionName)

    - #### withExpiredFactor

          public STSAssumeRoleSessionCredentialsProvider withExpiredFactor(double expiredFactor)

    - #### withExpiredDuration

          public STSAssumeRoleSessionCredentialsProvider withExpiredDuration(long expiredDurationSeconds)

    - #### getNewRoleSessionName

          public static String getNewRoleSessionName()

    - #### setCredentials

          public void setCredentials(Credentials creds)

      指定者:
        `setCredentials` 在接口中 `CredentialsProvider`

    - #### getCredentials

          public Credentials getCredentials()

      指定者:
        `getCredentials` 在接口中 `CredentialsProvider`

Copyright © 2020. All Rights Reserved.