Fix method renaming in comments and tests
This commit is contained in:
		
							parent
							
								
									5f8f856260
								
							
						
					
					
						commit
						57a8ef06b4
					
				|  | @ -299,7 +299,7 @@ func TestOIDCProviderRefreshSessionIfNeededWithIdToken(t *testing.T) { | ||||||
| 	assert.Equal(t, refreshToken, existingSession.RefreshToken) | 	assert.Equal(t, refreshToken, existingSession.RefreshToken) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func TestCreateSessionStateFromBearerToken(t *testing.T) { | func TestOIDCProviderCreateSessionFromToken(t *testing.T) { | ||||||
| 	const profileURLEmail = "janed@me.com" | 	const profileURLEmail = "janed@me.com" | ||||||
| 
 | 
 | ||||||
| 	testCases := map[string]struct { | 	testCases := map[string]struct { | ||||||
|  |  | ||||||
|  | @ -124,8 +124,7 @@ func (p *ProviderData) RefreshSessionIfNeeded(_ context.Context, _ *sessions.Ses | ||||||
| 	return false, nil | 	return false, nil | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // CreateSessionStateFromBearerToken should be implemented to allow providers
 | // CreateSessionFromToken converts Bearer IDTokens into sessions
 | ||||||
| // to convert ID tokens into sessions
 |  | ||||||
| func (p *ProviderData) CreateSessionFromToken(ctx context.Context, token string) (*sessions.SessionState, error) { | func (p *ProviderData) CreateSessionFromToken(ctx context.Context, token string) (*sessions.SessionState, error) { | ||||||
| 	if p.Verifier != nil { | 	if p.Verifier != nil { | ||||||
| 		return middleware.CreateTokenToSessionFunc(p.Verifier.Verify)(ctx, token) | 		return middleware.CreateTokenToSessionFunc(p.Verifier.Verify)(ctx, token) | ||||||
|  |  | ||||||
|  | @ -49,10 +49,13 @@ func TestAcrValuesConfigured(t *testing.T) { | ||||||
| 	assert.Contains(t, result, "acr_values=testValue") | 	assert.Contains(t, result, "acr_values=testValue") | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func TestEnrichSessionState(t *testing.T) { | func TestProviderDataEnrichSession(t *testing.T) { | ||||||
|  | 	g := NewWithT(t) | ||||||
| 	p := &ProviderData{} | 	p := &ProviderData{} | ||||||
| 	s := &sessions.SessionState{} | 	s := &sessions.SessionState{} | ||||||
| 	assert.NoError(t, p.EnrichSession(context.Background(), s)) | 
 | ||||||
|  | 	err := p.EnrichSession(context.Background(), s) | ||||||
|  | 	g.Expect(err).ToNot(HaveOccurred()) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func TestProviderDataAuthorize(t *testing.T) { | func TestProviderDataAuthorize(t *testing.T) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue