You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: identity/confidential_identity_provider.go
+41-4Lines changed: 41 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,10 @@ type ConfidentialIdentityProviderOptions struct {
32
32
33
33
// Authority is the authority used to authenticate with the identity provider.
34
34
AuthorityAuthorityConfiguration
35
+
36
+
// confidentialCredFactory is a factory for creating the confidential credential.
37
+
// This is used for testing purposes, to allow mocking the credential creation.
38
+
confidentialCredFactoryconfidentialCredFactory
35
39
}
36
40
37
41
// ConfidentialIdentityProvider represents a confidential identity provider.
@@ -46,7 +50,34 @@ type ConfidentialIdentityProvider struct {
46
50
scopes []string
47
51
48
52
// client confidential is the client used to request a manager from the identity provider.
49
-
client*confidential.Client
53
+
clientconfidentialTokenClient
54
+
}
55
+
56
+
// confidentialCredFacotory is a factory for creating the confidential credential.
57
+
// Introduced for testing purposes. This allows mocking the credential creation, default behavior is to use the confidential.NewCredFromSecret and confidential.NewCredFromCert methods.
0 commit comments