Skip to content

Commit

Permalink
feat: Added OAuth scope for the service
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 350670798
  • Loading branch information
Google APIs authored and Copybara-Service committed Jan 8, 2021
1 parent e843bea commit b241bbc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions google/maps/routes/v1/route_service.proto
Expand Up @@ -35,6 +35,7 @@ option php_namespace = "Google\\Maps\\Routes\\V1";
// The Routes Preferred API.
service RoutesPreferred {
option (google.api.default_host) = "routespreferred.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/maps-platform.routespreferred";

// Returns the primary route along with optional alternate routes, given a set
// of terminal and intermediate waypoints.
Expand Down
19 changes: 19 additions & 0 deletions google/maps/routes/v1/routespreferred.yaml
Expand Up @@ -6,3 +6,22 @@ title: Routes Preferred API
apis:
- name: google.maps.routes.v1.RoutesPreferred
- name: google.maps.routes.v1alpha.RoutesAlpha

authentication:
rules:
- selector: google.maps.routes.v1.RoutesPreferred.ComputeRouteMatrix
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/maps-platform.routespreferred
- selector: google.maps.routes.v1.RoutesPreferred.ComputeRoutes
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/maps-platform.routespreferred
- selector: google.maps.routes.v1alpha.RoutesAlpha.ComputeRouteMatrix
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/maps-platform.routespreferred
- selector: google.maps.routes.v1alpha.RoutesAlpha.ComputeRoutes
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/maps-platform.routespreferred
1 change: 1 addition & 0 deletions google/maps/routes/v1alpha/route_service.proto
Expand Up @@ -35,6 +35,7 @@ option php_namespace = "Google\\Maps\\Routes\\V1alpha";
// The Routes Preferred API.
service RoutesAlpha {
option (google.api.default_host) = "routespreferred.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/maps-platform.routespreferred";

// Returns the primary route along with optional alternate routes, given a set
// of terminal and intermediate waypoints.
Expand Down

0 comments on commit b241bbc

Please sign in to comment.