fix: response type mapping (#426)

* fix: return authorizations on userinfo

* fix: response type mapping

* fix tests

* fix angular

* regenerate mgmt proto

* enable login link again
This commit is contained in:
Livio Amstutz
2020-07-09 15:52:20 +02:00
committed by GitHub
parent 0b012f2fa2
commit 6128c0c672
13 changed files with 13246 additions and 13948 deletions

View File

@@ -87,7 +87,7 @@ func TestApplicationValid(t *testing.T) {
Name: "Name",
Type: AppTypeOIDC,
OIDCConfig: &OIDCConfig{
ResponseTypes: []OIDCResponseType{OIDCResponseTypeToken},
ResponseTypes: []OIDCResponseType{OIDCResponseTypeIDTokenToken},
GrantTypes: []OIDCGrantType{OIDCGrantTypeImplicit},
},
},
@@ -103,7 +103,7 @@ func TestApplicationValid(t *testing.T) {
Name: "Name",
Type: AppTypeOIDC,
OIDCConfig: &OIDCConfig{
ResponseTypes: []OIDCResponseType{OIDCResponseTypeToken},
ResponseTypes: []OIDCResponseType{OIDCResponseTypeIDTokenToken},
GrantTypes: []OIDCGrantType{OIDCGrantTypeAuthorizationCode},
},
},
@@ -135,7 +135,7 @@ func TestApplicationValid(t *testing.T) {
Name: "Name",
Type: AppTypeOIDC,
OIDCConfig: &OIDCConfig{
ResponseTypes: []OIDCResponseType{OIDCResponseTypeCode, OIDCResponseTypeToken},
ResponseTypes: []OIDCResponseType{OIDCResponseTypeCode, OIDCResponseTypeIDTokenToken},
GrantTypes: []OIDCGrantType{OIDCGrantTypeAuthorizationCode, OIDCGrantTypeImplicit},
},
},
@@ -151,7 +151,7 @@ func TestApplicationValid(t *testing.T) {
Name: "Name",
Type: AppTypeOIDC,
OIDCConfig: &OIDCConfig{
ResponseTypes: []OIDCResponseType{OIDCResponseTypeCode, OIDCResponseTypeIDToken, OIDCResponseTypeToken},
ResponseTypes: []OIDCResponseType{OIDCResponseTypeCode, OIDCResponseTypeIDToken, OIDCResponseTypeIDTokenToken},
GrantTypes: []OIDCGrantType{OIDCGrantTypeAuthorizationCode, OIDCGrantTypeImplicit},
},
},

View File

@@ -24,7 +24,7 @@ type OIDCResponseType int32
const (
OIDCResponseTypeCode OIDCResponseType = iota
OIDCResponseTypeIDToken
OIDCResponseTypeToken
OIDCResponseTypeIDTokenToken
)
type OIDCGrantType int32
@@ -69,7 +69,7 @@ func (c *OIDCConfig) getRequiredGrantTypes() []OIDCGrantType {
switch r {
case OIDCResponseTypeCode:
grantTypes = append(grantTypes, OIDCGrantTypeAuthorizationCode)
case OIDCResponseTypeIDToken, OIDCResponseTypeToken:
case OIDCResponseTypeIDToken, OIDCResponseTypeIDTokenToken:
if !implicit {
grantTypes = append(grantTypes, OIDCGrantTypeImplicit)
}