github.com/google/osv-scalibr@v0.4.1/veles/secrets/gcpoauth2client/gcpoauth2client.go (about)

     1  // Copyright 2025 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Package gcpoauth2client contains Veles Secret types and Detectors for GCP OAuth2 client credentials.
    16  package gcpoauth2client
    17  
    18  // Credentials represents a GCP OAuth2 client credential.
    19  //
    20  // See:
    21  // - https://developers.google.com/identity/protocols/oauth2
    22  // - https://developers.google.com/identity/protocols/oauth2/web-server#creatingclient
    23  type Credentials struct {
    24  	// ID is the client ID in format:
    25  	// `12345678901-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com`
    26  	ID string
    27  	// Secret is the client secret, typically 24+ character alphanumeric string prefixed with `GOCSPX-`
    28  	Secret string
    29  }