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