refactor oidcMeta/fix irsa controller

This commit is contained in:
kkb0318
2024-05-23 20:49:23 +09:00
parent baf04dd46d
commit 4b2a9f6694
14 changed files with 143 additions and 47 deletions
+3 -6
View File
@@ -4,6 +4,7 @@ import (
"context"
awsclient "github.com/kkb0318/irsa-manager/internal/aws"
"github.com/kkb0318/irsa-manager/internal/issuer"
"github.com/kkb0318/irsa-manager/internal/selfhosted"
)
@@ -32,11 +33,7 @@ func NewAwsS3IdpFactory(
}, nil
}
func (f *AwsS3IdPFactory) IssuerMeta() selfhosted.OIDCIssuerMeta {
return NewS3IssuerMeta(f.region, f.bucketName)
}
func (f *AwsS3IdPFactory) IdP(i selfhosted.OIDCIssuerMeta) (selfhosted.OIDCIdP, error) {
func (f *AwsS3IdPFactory) IdP(i issuer.OIDCIssuerMeta) (selfhosted.OIDCIdP, error) {
return NewAwsIdP(f.awsClient, i)
}
@@ -44,6 +41,6 @@ func (f *AwsS3IdPFactory) IdPDiscovery() selfhosted.OIDCIdPDiscovery {
return NewS3IdPDiscovery(f.awsClient, f.region, f.bucketName)
}
func (f *AwsS3IdPFactory) IdPDiscoveryContents(i selfhosted.OIDCIssuerMeta) selfhosted.OIDCIdPDiscoveryContents {
func (f *AwsS3IdPFactory) IdPDiscoveryContents(i issuer.OIDCIssuerMeta) selfhosted.OIDCIdPDiscoveryContents {
return NewIdPDiscoveryContents(f.jwk, i, f.jwksFileName)
}