Class: Baidu::OAuth::Flow::ClientCredentials
- Defined in:
- lib/baidu/oauth/flow/client_credentials.rb
Overview
采用Client Credentials方式,即应用公钥、密钥方式获取Access Token,适用于任何类型应用,但通过它所获取的Access Token只能用于访问与用户无关的Open API,并且需要开发者提前向百度开放平台申请,成功对接后方能使用。对于应用而言,其流程只有一步,即直接获取Access Token。
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#get_token(scope = nil) ⇒ Baidu::Session
使用 Client Credentials 获取 Access Token.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Baidu::OAuth::Flow::Base
Instance Method Details
#get_token(scope = nil) ⇒ Baidu::Session
使用 Client Credentials 获取 Access Token
25 26 27 |
# File 'lib/baidu/oauth/flow/client_credentials.rb', line 25 def get_token(scope=nil) super(nil, nil, scope: scope) end |