-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add JWT support for all the clients (#13)
* feat: add JWT support for all the clients * chore: remove ApiClient in lib.rs * chore: various fixes including name changes on classes across clients * chore: do JWT instead of JWTToken for rust * chore: make FliptClient private
- Loading branch information
Showing
15 changed files
with
191 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
import typing | ||
from .evaluation import Evaluation | ||
|
||
|
||
class FliptClient: | ||
def __init__( | ||
self, url: str = "http://localhost:8080", token: str = "", timeout: int = 60 | ||
self, | ||
url: str = "http://localhost:8080", | ||
client_token: typing.Optional[str] = None, | ||
jwt_token: typing.Optional[str] = None, | ||
timeout: int = 60, | ||
): | ||
self.evaluation = Evaluation(url, token, timeout) | ||
self.evaluation = Evaluation(url, client_token, jwt_token, timeout) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ author = ["Flipt Devs <[email protected]>"] | |
license = "MIT" | ||
keywords = ["flipt"] | ||
|
||
[features] | ||
flipt_integration = [] | ||
|
||
[dependencies] | ||
chrono = { version = "0.4.23", default-features = false, features = ["serde", "clock"] } | ||
reqwest = { version = "0.11.13", default-features = false, features = ["json", "rustls-tls"] } | ||
|
Oops, something went wrong.