@@ -641,15 +641,15 @@ message MutualTlsSecurityScheme {
641641// --8<-- [start:OAuthFlows]
642642// Defines the configuration for the supported OAuth 2.0 flows.
643643message OAuthFlows {
644+ // Tags 3 and 4 were previously used by deprecated OAuth flows.
645+ reserved 3 , 4 ;
644646 oneof flow {
645647 // Configuration for the OAuth Authorization Code flow.
646648 AuthorizationCodeOAuthFlow authorization_code = 1 ;
647649 // Configuration for the OAuth Client Credentials flow.
648650 ClientCredentialsOAuthFlow client_credentials = 2 ;
649- // Configuration for the OAuth Implicit flow.
650- ImplicitOAuthFlow implicit = 3 ;
651- // Configuration for the OAuth Resource Owner Password flow.
652- PasswordOAuthFlow password = 4 ;
651+ // Configuration for the OAuth Device Code flow.
652+ DeviceCodeOAuthFlow device_code = 5 ;
653653 }
654654}
655655// --8<-- [end:OAuthFlows]
@@ -665,6 +665,9 @@ message AuthorizationCodeOAuthFlow {
665665 string refresh_url = 3 ;
666666 // The available scopes for the OAuth2 security scheme.
667667 map <string , string > scopes = 4 [(google.api.field_behavior ) = REQUIRED ];
668+ // Indicates if PKCE (RFC 7636) is required for this flow.
669+ // PKCE should always be used for public clients and is recommended for all clients.
670+ bool pkce_required = 5 ;
668671}
669672// --8<-- [end:AuthorizationCodeOAuthFlow]
670673
@@ -680,29 +683,21 @@ message ClientCredentialsOAuthFlow {
680683}
681684// --8<-- [end:ClientCredentialsOAuthFlow]
682685
683- // --8<-- [start:ImplicitOAuthFlow]
684- // Defines configuration details for the OAuth 2.0 Implicit flow.
685- message ImplicitOAuthFlow {
686- // The authorization URL to be used for this flow.
687- string authorization_url = 1 [(google.api.field_behavior ) = REQUIRED ];
688- // The URL to be used for obtaining refresh tokens.
689- string refresh_url = 2 ;
690- // The available scopes for the OAuth2 security scheme.
691- map <string , string > scopes = 3 [(google.api.field_behavior ) = REQUIRED ];
692- }
693- // --8<-- [end:ImplicitOAuthFlow]
694-
695- // --8<-- [start:PasswordOAuthFlow]
696- // Defines configuration details for the OAuth 2.0 Resource Owner Password flow.
697- message PasswordOAuthFlow {
686+ // --8<-- [start:DeviceCodeOAuthFlow]
687+ // Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628).
688+ // This flow is designed for input-constrained devices such as IoT devices,
689+ // and CLI tools where the user authenticates on a separate device.
690+ message DeviceCodeOAuthFlow {
691+ // The device authorization endpoint URL.
692+ string device_authorization_url = 1 [(google.api.field_behavior ) = REQUIRED ];
698693 // The token URL to be used for this flow.
699- string token_url = 1 [(google.api.field_behavior ) = REQUIRED ];
694+ string token_url = 2 [(google.api.field_behavior ) = REQUIRED ];
700695 // The URL to be used for obtaining refresh tokens.
701- string refresh_url = 2 ;
696+ string refresh_url = 3 ;
702697 // The available scopes for the OAuth2 security scheme.
703- map <string , string > scopes = 3 [(google.api.field_behavior ) = REQUIRED ];
698+ map <string , string > scopes = 4 [(google.api.field_behavior ) = REQUIRED ];
704699}
705- // --8<-- [end:PasswordOAuthFlow ]
700+ // --8<-- [end:DeviceCodeOAuthFlow ]
706701
707702///////////// Request Messages ///////////
708703// --8<-- [start:SendMessageRequest]
0 commit comments