com.aliyun.oss.common.auth

## 接口 CredentialsFetcher

- 所有已知实现类:
    CustomSessionCredentialsFetcher, HttpCredentialsFetcher, InstanceProfileCredentialsFetcher

      public interface CredentialsFetcher

- - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `URL` | `buildUrl()` 构造授权服务器的URL
    `Credentials` | `fetch()` 从授权服务器获取授权
    `Credentials` | `fetch(int retryTimes)` 从授权服务器获取授权
    `Credentials` | `parse(com.aliyuncs.http.HttpResponse response)` 解析授权服务器返回的授权信息，解析为Credentials
    `com.aliyuncs.http.HttpResponse` | `send(com.aliyuncs.http.HttpRequest request)` 发送HTTP请求到授权服务器

- - ### 方法详细资料

    - #### buildUrl

          URL buildUrl()
                       throws com.aliyuncs.exceptions.ClientException

      构造授权服务器的URL
      返回:
        the url of authorization server
      抛出:
        `com.aliyuncs.exceptions.ClientException`

    - #### send

          com.aliyuncs.http.HttpResponse send(com.aliyuncs.http.HttpRequest request)
                                              throws IOException

      发送HTTP请求到授权服务器
      参数:
        `request` - HTTP请求
      返回:
        http response
      抛出:
        `IOException`

    - #### parse

          Credentials parse(com.aliyuncs.http.HttpResponse response)
                            throws com.aliyuncs.exceptions.ClientException

      解析授权服务器返回的授权信息，解析为Credentials
      参数:
        `response` - 授权服务器返回的授权信息
      返回:
      抛出:
        `com.aliyuncs.exceptions.ClientException`

    - #### fetch

          Credentials fetch()
                            throws com.aliyuncs.exceptions.ClientException

      从授权服务器获取授权
      返回:
        credentials
      抛出:
        `com.aliyuncs.exceptions.ClientException`

    - #### fetch

          Credentials fetch(int retryTimes)
                            throws com.aliyuncs.exceptions.ClientException

      从授权服务器获取授权
      参数:
        `retryTimes` - 失败重试此时
      返回:
        credentials
      抛出:
        `com.aliyuncs.exceptions.ClientException`

Copyright © 2020. All Rights Reserved.