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 575eb82
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions autorest/adal/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package adal

import (
"fmt"
"log"
"strconv"
"time"

Expand Down Expand Up @@ -57,13 +56,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 +69,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 575eb82

Please sign in to comment.