Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
e80701f4
Commit
e80701f4
authored
Jan 13, 2016
by
Eric Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Godeps: update go-oidc for updates to client and provider metadata
parent
09d8d842
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
6 deletions
+96
-6
Godeps.json
Godeps/Godeps.json
+5
-5
jose.go
Godeps/_workspace/src/github.com/coreos/go-oidc/jose/jose.go
+51
-0
jwk.go
Godeps/_workspace/src/github.com/coreos/go-oidc/jose/jwk.go
+4
-0
oauth2.go
..._workspace/src/github.com/coreos/go-oidc/oauth2/oauth2.go
+36
-1
client.go
...s/_workspace/src/github.com/coreos/go-oidc/oidc/client.go
+0
-0
provider.go
..._workspace/src/github.com/coreos/go-oidc/oidc/provider.go
+0
-0
No files found.
Godeps/Godeps.json
View file @
e80701f4
...
@@ -16,23 +16,23 @@
...
@@ -16,23 +16,23 @@
},
},
{
{
"ImportPath"
:
"github.com/coreos/go-oidc/http"
,
"ImportPath"
:
"github.com/coreos/go-oidc/http"
,
"Rev"
:
"
145916abb78708694762ff359ab1e34c47c7947f
"
"Rev"
:
"
6039032c0b15517897116d333ead8edf38792437
"
},
},
{
{
"ImportPath"
:
"github.com/coreos/go-oidc/jose"
,
"ImportPath"
:
"github.com/coreos/go-oidc/jose"
,
"Rev"
:
"
145916abb78708694762ff359ab1e34c47c7947f
"
"Rev"
:
"
6039032c0b15517897116d333ead8edf38792437
"
},
},
{
{
"ImportPath"
:
"github.com/coreos/go-oidc/key"
,
"ImportPath"
:
"github.com/coreos/go-oidc/key"
,
"Rev"
:
"
145916abb78708694762ff359ab1e34c47c7947f
"
"Rev"
:
"
6039032c0b15517897116d333ead8edf38792437
"
},
},
{
{
"ImportPath"
:
"github.com/coreos/go-oidc/oauth2"
,
"ImportPath"
:
"github.com/coreos/go-oidc/oauth2"
,
"Rev"
:
"
145916abb78708694762ff359ab1e34c47c7947f
"
"Rev"
:
"
6039032c0b15517897116d333ead8edf38792437
"
},
},
{
{
"ImportPath"
:
"github.com/coreos/go-oidc/oidc"
,
"ImportPath"
:
"github.com/coreos/go-oidc/oidc"
,
"Rev"
:
"
145916abb78708694762ff359ab1e34c47c7947f
"
"Rev"
:
"
6039032c0b15517897116d333ead8edf38792437
"
},
},
{
{
"ImportPath"
:
"github.com/coreos/pkg/capnslog"
,
"ImportPath"
:
"github.com/coreos/pkg/capnslog"
,
...
...
Godeps/_workspace/src/github.com/coreos/go-oidc/jose/jose.go
View file @
e80701f4
...
@@ -13,6 +13,57 @@ const (
...
@@ -13,6 +13,57 @@ const (
HeaderKeyID
=
"kid"
HeaderKeyID
=
"kid"
)
)
const
(
// Encryption Algorithm Header Parameter Values for JWS
// See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#page-6
AlgHS256
=
"HS256"
AlgHS384
=
"HS384"
AlgHS512
=
"HS512"
AlgRS256
=
"RS256"
AlgRS384
=
"RS384"
AlgRS512
=
"RS512"
AlgES256
=
"ES256"
AlgES384
=
"ES384"
AlgES512
=
"ES512"
AlgPS256
=
"PS256"
AlgPS384
=
"PS384"
AlgPS512
=
"PS512"
AlgNone
=
"none"
)
const
(
// Algorithm Header Parameter Values for JWE
// See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#section-4.1
AlgRSA15
=
"RSA1_5"
AlgRSAOAEP
=
"RSA-OAEP"
AlgRSAOAEP256
=
"RSA-OAEP-256"
AlgA128KW
=
"A128KW"
AlgA192KW
=
"A192KW"
AlgA256KW
=
"A256KW"
AlgDir
=
"dir"
AlgECDHES
=
"ECDH-ES"
AlgECDHESA128KW
=
"ECDH-ES+A128KW"
AlgECDHESA192KW
=
"ECDH-ES+A192KW"
AlgECDHESA256KW
=
"ECDH-ES+A256KW"
AlgA128GCMKW
=
"A128GCMKW"
AlgA192GCMKW
=
"A192GCMKW"
AlgA256GCMKW
=
"A256GCMKW"
AlgPBES2HS256A128KW
=
"PBES2-HS256+A128KW"
AlgPBES2HS384A192KW
=
"PBES2-HS384+A192KW"
AlgPBES2HS512A256KW
=
"PBES2-HS512+A256KW"
)
const
(
// Encryption Algorithm Header Parameter Values for JWE
// See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#page-22
EncA128CBCHS256
=
"A128CBC-HS256"
EncA128CBCHS384
=
"A128CBC-HS384"
EncA256CBCHS512
=
"A256CBC-HS512"
EncA128GCM
=
"A128GCM"
EncA192GCM
=
"A192GCM"
EncA256GCM
=
"A256GCM"
)
type
JOSEHeader
map
[
string
]
string
type
JOSEHeader
map
[
string
]
string
func
(
j
JOSEHeader
)
Validate
()
error
{
func
(
j
JOSEHeader
)
Validate
()
error
{
...
...
Godeps/_workspace/src/github.com/coreos/go-oidc/jose/jwk.go
View file @
e80701f4
...
@@ -70,6 +70,10 @@ func (j *JWK) UnmarshalJSON(data []byte) error {
...
@@ -70,6 +70,10 @@ func (j *JWK) UnmarshalJSON(data []byte) error {
return
nil
return
nil
}
}
type
JWKSet
struct
{
Keys
[]
JWK
`json:"keys"`
}
func
decodeExponent
(
e
string
)
(
int
,
error
)
{
func
decodeExponent
(
e
string
)
(
int
,
error
)
{
decE
,
err
:=
decodeBase64URLPaddingOptional
(
e
)
decE
,
err
:=
decodeBase64URLPaddingOptional
(
e
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
Godeps/_workspace/src/github.com/coreos/go-oidc/oauth2/oauth2.go
View file @
e80701f4
...
@@ -8,14 +8,49 @@ import (
...
@@ -8,14 +8,49 @@ import (
"mime"
"mime"
"net/http"
"net/http"
"net/url"
"net/url"
"sort"
"strconv"
"strconv"
"strings"
"strings"
phttp
"github.com/coreos/go-oidc/http"
phttp
"github.com/coreos/go-oidc/http"
)
)
// ResponseTypesEqual compares two response_type values. If either
// contains a space, it is treated as an unordered list. For example,
// comparing "code id_token" and "id_token code" would evaluate to true.
func
ResponseTypesEqual
(
r1
,
r2
string
)
bool
{
if
!
strings
.
Contains
(
r1
,
" "
)
||
!
strings
.
Contains
(
r2
,
" "
)
{
// fast route, no split needed
return
r1
==
r2
}
// split, sort, and compare
r1Fields
:=
strings
.
Fields
(
r1
)
r2Fields
:=
strings
.
Fields
(
r2
)
if
len
(
r1Fields
)
!=
len
(
r2Fields
)
{
return
false
}
sort
.
Strings
(
r1Fields
)
sort
.
Strings
(
r2Fields
)
for
i
,
r1Field
:=
range
r1Fields
{
if
r1Field
!=
r2Fields
[
i
]
{
return
false
}
}
return
true
}
const
(
const
(
ResponseTypeCode
=
"code"
// OAuth2.0 response types registered by OIDC.
//
// See: https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#RegistryContents
ResponseTypeCode
=
"code"
ResponseTypeCodeIDToken
=
"code id_token"
ResponseTypeCodeIDTokenToken
=
"code id_token token"
ResponseTypeIDToken
=
"id_token"
ResponseTypeIDTokenToken
=
"id_token token"
ResponseTypeToken
=
"token"
ResponseTypeNone
=
"none"
)
)
const
(
const
(
...
...
Godeps/_workspace/src/github.com/coreos/go-oidc/oidc/client.go
View file @
e80701f4
This diff is collapsed.
Click to expand it.
Godeps/_workspace/src/github.com/coreos/go-oidc/oidc/provider.go
View file @
e80701f4
This diff is collapsed.
Click to expand it.
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