forked from marshallbrekka/go-u2fhost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request marshallbrekka#1 from segmentio/master
Merge upstream
- Loading branch information
Showing
534 changed files
with
164,273 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
// versionCmd represents the version command | ||
var versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "print version", | ||
RunE: versionRun, | ||
} | ||
|
||
func init() { | ||
RootCmd.AddCommand(versionCmd) | ||
} | ||
|
||
func versionRun(cmd *cobra.Command, args []string) error { | ||
fmt.Fprintf(os.Stdout, "aws-okta %s\n", version) | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package lib | ||
|
||
import ( | ||
"github.com/99designs/keyring" | ||
) | ||
|
||
func keyringPrompt(prompt string) (string, error) { | ||
return Prompt(prompt, true) | ||
} | ||
|
||
func OpenKeyring(allowedBackends []keyring.BackendType) (kr keyring.Keyring, err error) { | ||
kr, err = keyring.Open(keyring.Config{ | ||
AllowedBackends: allowedBackends, | ||
KeychainTrustApplication: true, | ||
// this keychain name is for backwards compatibility | ||
ServiceName: "aws-okta-login", | ||
LibSecretCollectionName: "awsvault", | ||
FileDir: "~/.aws-okta/", | ||
FilePasswordFunc: keyringPrompt, | ||
}) | ||
|
||
return | ||
} |
Oops, something went wrong.