Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Vault
Commits
243ab6bd
Commit
243ab6bd
authored
8 years ago
by
Jeff Mitchell
Browse files
Options
Download
Email Patches
Plain Diff
Add default mount param to userpass cli handler
parent
8325d3a0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
builtin/credential/userpass/cli.go
+4
-2
builtin/credential/userpass/cli.go
cli/commands.go
+1
-1
cli/commands.go
with
5 additions
and
3 deletions
+5
-3
builtin/credential/userpass/cli.go
+
4
-
2
View file @
243ab6bd
...
...
@@ -10,7 +10,9 @@ import (
"github.com/mitchellh/mapstructure"
)
type
CLIHandler
struct
{}
type
CLIHandler
struct
{
DefaultMount
string
}
func
(
h
*
CLIHandler
)
Auth
(
c
*
api
.
Client
,
m
map
[
string
]
string
)
(
string
,
error
)
{
var
data
struct
{
...
...
@@ -37,7 +39,7 @@ func (h *CLIHandler) Auth(c *api.Client, m map[string]string) (string, error) {
data
.
Password
=
password
}
if
data
.
Mount
==
""
{
data
.
Mount
=
"userpass"
data
.
Mount
=
h
.
DefaultMount
}
options
:=
map
[
string
]
interface
{}{
...
...
This diff is collapsed.
Click to expand it.
cli/commands.go
+
1
-
1
View file @
243ab6bd
...
...
@@ -110,7 +110,7 @@ func Commands(metaPtr *meta.Meta) map[string]cli.CommandFactory {
Meta
:
*
metaPtr
,
Handlers
:
map
[
string
]
command
.
AuthHandler
{
"github"
:
&
credGitHub
.
CLIHandler
{},
"userpass"
:
&
credUserpass
.
CLIHandler
{},
"userpass"
:
&
credUserpass
.
CLIHandler
{
DefaultMount
:
"userpass"
},
"ldap"
:
&
credLdap
.
CLIHandler
{},
"okta"
:
&
credOkta
.
CLIHandler
{},
"cert"
:
&
credCert
.
CLIHandler
{},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help