Class: VoiceRecognitionBing::Authorization
- Inherits:
-
Object
- Object
- VoiceRecognitionBing::Authorization
- Defined in:
- lib/voice_recognition_bing/authorization.rb
Instance Attribute Summary collapse
-
#ms_service ⇒ Object
writeonly
Sets the attribute ms_service.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#ms_service=(value) ⇒ Object (writeonly)
Sets the attribute ms_service
8 9 10 |
# File 'lib/voice_recognition_bing/authorization.rb', line 8 def ms_service=(value) @ms_service = value end |
Class Method Details
.credentials ⇒ Object
9 10 11 |
# File 'lib/voice_recognition_bing/authorization.rb', line 9 def self.credentials new.credentials end |
Instance Method Details
#credentials ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/voice_recognition_bing/authorization.rb', line 13 def credentials return NullCredentials.new unless valid_params response = remote_service.authenticate(subscription_key: VoiceRecognitionBing.configuration.subscription_key) Credentials.new(extract_token(response)) end |