Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
90e9f29b
Unverified
Commit
90e9f29b
authored
Apr 02, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71900 from charrywanganthony/remove-unused-parseAcrToken
remove unused function
parents
70a1e504
7f1327ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
20 deletions
+0
-20
BUILD
pkg/credentialprovider/azure/BUILD
+0
-1
azure_acr_helper.go
pkg/credentialprovider/azure/azure_acr_helper.go
+0
-19
No files found.
pkg/credentialprovider/azure/BUILD
View file @
90e9f29b
...
...
@@ -20,7 +20,6 @@ go_library(
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library",
"//vendor/github.com/dgrijalva/jwt-go:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/k8s.io/klog:go_default_library",
"//vendor/sigs.k8s.io/yaml:go_default_library",
...
...
pkg/credentialprovider/azure/azure_acr_helper.go
View file @
90e9f29b
...
...
@@ -54,8 +54,6 @@ import (
"strconv"
"strings"
"unicode"
jwt
"github.com/dgrijalva/jwt-go"
)
type
authDirective
struct
{
...
...
@@ -142,23 +140,6 @@ func receiveChallengeFromLoginServer(serverAddress string) (*authDirective, erro
},
nil
}
func
parseAcrToken
(
identityToken
string
)
(
token
*
acrTokenPayload
,
err
error
)
{
tokenSegments
:=
strings
.
Split
(
identityToken
,
"."
)
if
len
(
tokenSegments
)
<
2
{
return
nil
,
fmt
.
Errorf
(
"Invalid existing refresh token length: %d"
,
len
(
tokenSegments
))
}
payloadSegmentEncoded
:=
tokenSegments
[
1
]
var
payloadBytes
[]
byte
if
payloadBytes
,
err
=
jwt
.
DecodeSegment
(
payloadSegmentEncoded
);
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"Error decoding payload segment from refresh token, error: %s"
,
err
)
}
var
payload
acrTokenPayload
if
err
=
json
.
Unmarshal
(
payloadBytes
,
&
payload
);
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"Error unmarshalling acr payload, error: %s"
,
err
)
}
return
&
payload
,
nil
}
func
performTokenExchange
(
serverAddress
string
,
directive
*
authDirective
,
...
...
Write
Preview
Markdown
is supported
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