Skip to content

Commit

Permalink
Changes requested in review
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Sep 12, 2017
1 parent a04d94c commit 727791b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions autorest/adal/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ func (t AzureCLIToken) ToToken() (*Token, error) {
}

difference := tokenExpirationDate.Sub(expirationBase)
seconds := difference.Seconds()

token := Token{
AccessToken: t.AccessToken,
Type: t.TokenType,
ExpiresIn: "3600",
ExpiresOn: strconv.Itoa(int(seconds)),
ExpiresOn: strconv.Itoa(int(difference.Seconds())),
RefreshToken: t.RefreshToken,
Resource: t.Resource,
}
Expand All @@ -72,8 +70,6 @@ func (t AzureCLIToken) ToToken() (*Token, error) {

// ParseAzureCLIExpirationDate parses either a Azure CLI or CloudShell date into a time object
func ParseAzureCLIExpirationDate(input string) (*time.Time, error) {
log.Printf("[DEBUG] Token Date: %s", input)

// CloudShell (and potentially the Azure CLI in future)
expirationDate, cloudShellErr := time.Parse(time.RFC3339, input)
if cloudShellErr != nil {
Expand Down

0 comments on commit 727791b

Please sign in to comment.