twine.auth module¶
- twine.auth.TOKEN_RENEWAL_THRESHOLD: Final[timedelta] = datetime.timedelta(seconds=300)¶
Tokens expire after 15 minutes, let’s start allowing renewal/replacement after 10 minutes that way if we fail, we may still have time to replace it before it expires. Thus, if our current time + this threshold is past the greater or equal to the expiration time, we should start trying to replace the token.
- class twine.auth.TrustedPublishingToken[source]¶
- message: str | None¶
- errors: list[TrustedPublishingTokenRetrievalError] | None¶
- token: str | None¶
- success: bool | None¶
- expires: int | None¶
- class twine.auth.Resolver[source]¶
- _tp_token: TrustedPublishingToken | None = None¶
- _expires: int | None = None¶
- __init__(config: Dict[str, str | None], input: CredentialInput) None[source]¶
- property authenticator: AuthBase¶
- property username: str | None¶
- property password: str | None¶
- _make_trusted_publishing_token() TrustedPublishingToken | None[source]¶
- property system: str | None¶