renaming
This commit is contained in:
parent
24120554e5
commit
36800145d6
5 changed files with 18 additions and 18 deletions
|
@ -300,7 +300,7 @@ func (c *ConfClient) IsScopeAllowed(scope string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConfClient) UserInfoInIDToken() bool {
|
func (c *ConfClient) IDTokenUserinfoClaimsAssertion() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ type Client interface {
|
||||||
RestrictAdditionalIdTokenScopes() func(scopes []string) []string
|
RestrictAdditionalIdTokenScopes() func(scopes []string) []string
|
||||||
RestrictAdditionalAccessTokenScopes() func(scopes []string) []string
|
RestrictAdditionalAccessTokenScopes() func(scopes []string) []string
|
||||||
IsScopeAllowed(scope string) bool
|
IsScopeAllowed(scope string) bool
|
||||||
UserInfoInIDToken() bool
|
IDTokenUserinfoClaimsAssertion() bool
|
||||||
ClockSkew() time.Duration
|
ClockSkew() time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,20 @@ func (mr *MockClientMockRecorder) IDTokenLifetime() *gomock.Call {
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IDTokenLifetime", reflect.TypeOf((*MockClient)(nil).IDTokenLifetime))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IDTokenLifetime", reflect.TypeOf((*MockClient)(nil).IDTokenLifetime))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IDTokenUserinfoClaimsAssertion mocks base method
|
||||||
|
func (m *MockClient) IDTokenUserinfoClaimsAssertion() bool {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "IDTokenUserinfoClaimsAssertion")
|
||||||
|
ret0, _ := ret[0].(bool)
|
||||||
|
return ret0
|
||||||
|
}
|
||||||
|
|
||||||
|
// IDTokenUserinfoClaimsAssertion indicates an expected call of IDTokenUserinfoClaimsAssertion
|
||||||
|
func (mr *MockClientMockRecorder) IDTokenUserinfoClaimsAssertion() *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IDTokenUserinfoClaimsAssertion", reflect.TypeOf((*MockClient)(nil).IDTokenUserinfoClaimsAssertion))
|
||||||
|
}
|
||||||
|
|
||||||
// IsScopeAllowed mocks base method
|
// IsScopeAllowed mocks base method
|
||||||
func (m *MockClient) IsScopeAllowed(arg0 string) bool {
|
func (m *MockClient) IsScopeAllowed(arg0 string) bool {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
|
@ -230,17 +244,3 @@ func (mr *MockClientMockRecorder) RestrictAdditionalIdTokenScopes() *gomock.Call
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictAdditionalIdTokenScopes", reflect.TypeOf((*MockClient)(nil).RestrictAdditionalIdTokenScopes))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictAdditionalIdTokenScopes", reflect.TypeOf((*MockClient)(nil).RestrictAdditionalIdTokenScopes))
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserInfoInIDToken mocks base method
|
|
||||||
func (m *MockClient) UserInfoInIDToken() bool {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "UserInfoInIDToken")
|
|
||||||
ret0, _ := ret[0].(bool)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// UserInfoInIDToken indicates an expected call of UserInfoInIDToken
|
|
||||||
func (mr *MockClientMockRecorder) UserInfoInIDToken() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserInfoInIDToken", reflect.TypeOf((*MockClient)(nil).UserInfoInIDToken))
|
|
||||||
}
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ func (c *ConfClient) IsScopeAllowed(scope string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConfClient) UserInfoInIDToken() bool {
|
func (c *ConfClient) IDTokenUserinfoClaimsAssertion() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ func CreateIDToken(ctx context.Context, issuer string, authReq AuthRequest, vali
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
claims.SetAccessTokenHash(atHash)
|
claims.SetAccessTokenHash(atHash)
|
||||||
if !client.UserInfoInIDToken() {
|
if !client.IDTokenUserinfoClaimsAssertion() {
|
||||||
scopes = removeUserinfoScopes(scopes)
|
scopes = removeUserinfoScopes(scopes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue