cmd

package
v0.0.0-...-968246c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2017 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Copyright © 2017 Sergiu Bodiu

Use of this source code is governed by and MIT license that can be found in the LICENSE file

Use of this source code is governed by and MIT license that can be found in the LICENSE file

Use of this source code is governed by and MIT license that can be found in the LICENSE file

Use of this source code is governed by and MIT license that can be found in the LICENSE file

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "sso-aws",
	Short: "A command line tool to help with SAML access to the AWS token service.",
	Long:  `ss-aws version 1.0.0 - command line tool to help with SAML access to the AWS token service.`,
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type ADFSClient

type ADFSClient struct {
	// contains filtered or unexported fields
}

ADFSClient wrapper around ADFS enabling authentication and retrieval of assertions

func NewADFSClient

func NewADFSClient(skipVerify bool, ignoreProxy bool) (*ADFSClient, error)

NewADFSClient create a new ADFS client

func (*ADFSClient) Authenticate

func (ac *ADFSClient) Authenticate(loginDetails *LoginDetails) (string, error)

Authenticate authenticate to ADFS and return the data from the body of the SAML assertion.

type LoginDetails

type LoginDetails struct {
	Username string
	Password string
	Hostname string
}

LoginDetails used to authenticate to ADFS

func PromptForLoginDetails

func PromptForLoginDetails(username, hostname, password string) (*LoginDetails, error)

PromptForLoginDetails prompt the user to present their username, password and hostname

func (*LoginDetails) Validate

func (ld *LoginDetails) Validate() error

Validate validate the login details

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL