Skip to content

Commit 8e8ecf6

Browse files
committed
start of examples
1 parent 905af80 commit 8e8ecf6

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

core/examples/secure_sso.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
1+
from sso.fastcomments_sso import FastCommentsSSO
2+
from sso.secure_sso_user_data import SecureSSOUserData
3+
4+
15
def main():
2-
pass
6+
api_key = "your_api_key_here"
7+
# This should be done server side for security
8+
user_data = SecureSSOUserData(
9+
"user-123",
10+
11+
"John Doe",
12+
"Avatar"
13+
)
14+
15+
# Create SSO config with payload
16+
sso = FastCommentsSSO.new_secure(api_key, user_data)
17+
18+
tenant_id = "tenant-123"
19+
url_id = "123"
20+
token = sso.create_token()
21+
22+
# Create configuration
23+
24+
# Interact with client

core/examples/simple_sso.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1+
from sso.fastcomments_sso import FastCommentsSSO
2+
from sso.simple_sso_user_data import SimpleSSOUserData
3+
4+
15
def main():
2-
pass
6+
api_key = "your_api_key_here"
7+
# This should be done server side for security
8+
user_data = SimpleSSOUserData(
9+
"user-123",
10+
11+
"Avatar"
12+
)
13+
14+
# Create SSO config with payload
15+
sso = FastCommentsSSO.new_simple(user_data)
16+
17+
tenant_id = "tenant-123"
18+
url_id = "123"
19+
token = sso.create_token()
20+
21+
# Create configuration
22+
23+
# Interact with client

0 commit comments

Comments
 (0)