Skip to content

Commit f9d380e

Browse files
committed
Issuer: Remove from_trust_config()
This is not a very useful helper: just use the url at callsite Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 74a51f9 commit f9d380e

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

sigstore/_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ def _get_identity(
11901190
if args.oidc_issuer is not None:
11911191
issuer = Issuer(args.oidc_issuer)
11921192
else:
1193-
issuer = Issuer.from_trust_config(trust_config)
1193+
issuer = Issuer(trust_config.signing_config.get_oidc_url())
11941194

11951195
if args.oidc_client_secret is None:
11961196
args.oidc_client_secret = "" # nosec: B105

sigstore/oidc.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from pydantic import BaseModel, StrictStr
3333

3434
from sigstore._internal import USER_AGENT
35-
from sigstore._internal.trust import ClientTrustConfig
3635
from sigstore.errors import Error, NetworkError
3736

3837
# See: https://github.com/sigstore/fulcio/blob/b2186c0/pkg/config/config.go#L182-L201
@@ -269,13 +268,6 @@ def __init__(self, base_url: str) -> None:
269268
except ValueError as exc:
270269
raise IssuerError(f"OIDC issuer returned invalid configuration: {exc}")
271270

272-
@classmethod
273-
def from_trust_config(cls, trust_config: ClientTrustConfig) -> Issuer:
274-
"""
275-
Return `Issuer` for given `ClientTrustConfig`.
276-
"""
277-
return cls(trust_config.signing_config.get_oidc_url())
278-
279271
def identity_token( # nosec: B107
280272
self,
281273
client_id: str = "sigstore",

0 commit comments

Comments
 (0)