Class: FirebaseCloudMessenger::AuthClient
- Inherits:
-
Object
- Object
- FirebaseCloudMessenger::AuthClient
- Defined in:
- lib/firebase_cloud_messenger/auth_client.rb
Constant Summary collapse
- AUTH_SCOPE =
"https://www.googleapis.com/auth/firebase.messaging".freeze
Instance Attribute Summary collapse
-
#credentials_path ⇒ Object
readonly
Returns the value of attribute credentials_path.
Instance Method Summary collapse
- #fetch_access_token_info ⇒ Object
-
#initialize(credentials_path = nil) ⇒ AuthClient
constructor
A new instance of AuthClient.
Constructor Details
#initialize(credentials_path = nil) ⇒ AuthClient
Returns a new instance of AuthClient.
9 10 11 12 13 14 15 |
# File 'lib/firebase_cloud_messenger/auth_client.rb', line 9 def initialize(credentials_path = nil) @credentials_path = credentials_path raise_credentials_not_supplied if !credentials_supplied? @authorizer = Google::Auth::ServiceAccountCredentials.make_creds(cred_args) end |
Instance Attribute Details
#credentials_path ⇒ Object (readonly)
Returns the value of attribute credentials_path.
5 6 7 |
# File 'lib/firebase_cloud_messenger/auth_client.rb', line 5 def credentials_path @credentials_path end |
Instance Method Details
#fetch_access_token_info ⇒ Object
17 18 19 |
# File 'lib/firebase_cloud_messenger/auth_client.rb', line 17 def fetch_access_token_info .fetch_access_token! end |