Documentation
¶
Overview ¶
Copyright 2018 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func ClearCache() error
- func Fetch(settings *sgauth.Settings, format string)
- func Header(settings *sgauth.Settings, format string)
- func Info(token string)
- func InsertCache(settings *sgauth.Settings, token *sgauth.Token) error
- func LookupCache(settings *sgauth.Settings) (*sgauth.Token, error)
- func Reset()
- func SSOFetch(email string, cli string, task string, scope string)
- func Test(token string)
- type CacheKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearCache ¶
func ClearCache() error
func Fetch ¶
Fetches and prints the token in plain text with the given settings using Google Authenticator.
func Header ¶
Fetches and prints the token in header format with the given settings using Google Authenticator.
Types ¶
type CacheKey ¶
type CacheKey struct { // The JSON credentials content downloaded from Google Cloud Console. CredentialsJSON string // If specified, use OAuth. Otherwise, JWT. Scope string // The audience field for JWT auth Audience string // The Google API key APIKey string }
The key struct that used to identify an auth token fetch operation.