Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
> As of v1.4.0, release candidates will be published in an effort to get new features out faster while still allowing
> time for full QA testing before moving the release candidate to a full release.

## v2.1.0-rc.3 [2025-02-28]

__What's New:__

* None

__Enhancements:__

* None

__Bug Fixes:__

* `source_federation_token` is a util now.

__Dependencies:__

* None

__Other:__

* None

## v2.1.0-rc.2 [2025-02-28]

__What's New:__
Expand Down
2 changes: 1 addition & 1 deletion src/pybritive/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.1.0-rc.2'
__version__ = '2.1.0-rc.3'
13 changes: 6 additions & 7 deletions src/pybritive/helpers/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
import click
import jwt
import requests
from britive.britive import Britive
from britive.helpers.utils import parse_tenant
from britive.helpers.utils import (
parse_tenant,
source_federation_token,
)
from dateutil import parser
from requests.adapters import HTTPAdapter, Retry

Expand Down Expand Up @@ -182,8 +184,7 @@ def _extract_exp_from_jwt(token: str, verify: bool = False, convert_to_ms: bool

def perform_federation_provider_authentication(self):
self.cli.print(
f'Performing {self.federation_provider} federation provider authentication '
f'against tenant {self.tenant}.'
f'Performing {self.federation_provider} federation provider authentication against tenant {self.tenant}.'
)

# we need to extract the duration, if provided
Expand All @@ -199,9 +200,7 @@ def perform_federation_provider_authentication(self):
)

# generate the token
generated_token = Britive.source_federation_token_from(
provider=helper[0], tenant=self.tenant, duration_seconds=duration
)
generated_token = source_federation_token(provider=helper[0], tenant=self.tenant, duration_seconds=duration)

# obtain the provider and expiration time of the token
provider, token = generated_token.split('::')
Expand Down