Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ target/

#Ipython Notebook
.ipynb_checkpoints
.vscode/
2 changes: 1 addition & 1 deletion okta/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(
configuration = Configuration.get_default()
self.configuration = Configuration(
host=configuration["client"]["orgUrl"],
access_token=configuration["client"]["token"],
access_token=configuration["client"].get("token", None),
api_key=configuration["client"].get("privateKey", None),
authorization_mode=configuration["client"].get("authorizationMode", "SSWS"),
)
Expand Down
4 changes: 2 additions & 2 deletions okta/models/user_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class UserProfile(BaseModel):
locale: Optional[StrictStr] = Field(
default=None,
description="The language specified as an [IETF BCP 47 language tag]("
"https://datatracker.ietf.org/doc/html/rfc5646)",
"https://datatracker.ietf.org/doc/html/rfc5646)",
)
login: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None
manager: Optional[StrictStr] = None
Expand All @@ -83,7 +83,7 @@ class UserProfile(BaseModel):
)
profile_url: Optional[StrictStr] = Field(default=None, alias="profileUrl")
second_email: Optional[
Annotated[str, Field(min_length=5, strict=True, max_length=100)]
Annotated[str, Field(min_length=0, strict=True, max_length=100)]
] = Field(default=None, alias="secondEmail")
state: Optional[Annotated[str, Field(strict=True, max_length=128)]] = None
street_address: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = (
Expand Down
1 change: 0 additions & 1 deletion okta/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ async def get_access_token(self):
"grant_type": "client_credentials",
"scope": " ".join(self._config["client"]["scopes"]),
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": jwt,
}

encoded_parameters = urlencode(parameters, quote_via=quote)
Expand Down
2 changes: 1 addition & 1 deletion openapi/templates/api_client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ApiClient:
configuration = Configuration.get_default()
self.configuration = Configuration(
host=configuration["client"]["orgUrl"],
access_token=configuration["client"]["token"],
access_token=configuration["client"].get("token", None),
api_key=configuration["client"].get("privateKey", None),
authorization_mode=configuration["client"].get("authorizationMode", "SSWS"),
)
Expand Down