google-authentication-call
Authentication using the Google APIs
To access a user’s private data, your application must work with Google’s policies for authentication and authorization. Authorized API calls can read and write private user data, or the application’s own data API key plus OAuth 2.0 credentials. See OAuth 2.0 protocol documentation for more details.
Google-authentication-call attributes
Fixed attributes:
- type: Unmodifiable. Used by GreenVulcanoESB factory framework.
Implied attributes:
- property: call property.
Required attributes:
- certificate: Google authentication certificate.
- name: Google authentication name.
Subelements
google-authentication-call has the followong subelements:
- Description (optional).
- scopes (one element).
scopes
Scopes are strings that enable access to particular resources, such as user data. See Authorization scopes documentation for more details.
Subelements
scopes has the followong subelement:
- scope (at least one element).
Example
<?xml version="1.0" encoding="UTF-8"?>
<GVSystems name="SYSTEMS" type="module">
<Systems>
<Description>This section contains a list of all systems connected to GreenVulcano ESB</Description>
<System id-system="FCM" system-activation="on">
<Channel id-channel="google_api" type="GoogleAdapter">
<google-authentication-call certificate="xmlp{{fcm.auth.certificate.path}}" name="authorize" property="FCM_AUTH_TOKEN" type="call">
<scopes>
<scope>https://www.googleapis.com/auth/firebase.messaging</scope>
</scopes>
</google-authentication-call>
</Channel>
<Channel endpoint="https://fcm.googleapis.com/v1" id-channel="http_v1" type="RESTAdapter">
<rest-call method="POST" name="sendNotification" request-uri="/projects/xmlp{{fcm.project.id}}/messages:send" type="call">
<headers>
<header name="Content-Type" value="application/JSON" />
<header name="Authorization" value="Bearer @{{FCM_AUTH_TOKEN}}" />
</headers>
<parameters />
<body><![CDATA[{
"message":{
"notification": {
"title": "@{{FCM_NOTIFICATION_TITLE}}",
"body": "@{{FCM_NOTIFICATION_BODY}}",
},
"token": "@{{FCM_DEVICE_TOKEN}}"
}
}]]></body>
</rest-call>
</Channel>
</System>
</Systems>
</GVSystems>