Skip to content

Commit

Permalink
MFA Configuration
Browse files Browse the repository at this point in the history
Updated mysession for mfa configuration possibility
  • Loading branch information
Maksymilian Wojczuk committed Jun 18, 2018
1 parent cf62612 commit 191727b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mysession/mysession.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package mysession

import (
"errors"
"github.com/Appliscale/perun/cliparser"
"github.com/Appliscale/perun/context"
"github.com/Appliscale/perun/utilities"
"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -49,7 +50,7 @@ func CreateSession(context *context.Context, profile string, region *string) (*s
}

func UpdateSessionToken(profile string, region string, defaultDuration int64, context *context.Context) error {
if *context.CliArguments.MFA {
if *context.CliArguments.MFA || *context.CliArguments.Mode == cliparser.MfaMode {
user, userError := user.Current()
if userError != nil {
return userError
Expand Down

0 comments on commit 191727b

Please sign in to comment.