Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e969eb6
Changed default cloud for ConnectionSettings to be PROD
rodrigobr-msft Aug 12, 2025
418c3dc
Merge branch 'main' of https://github.com/Microsoft/Agents-for-python
rodrigobr-msft Aug 12, 2025
2c7cbb2
New draft implementations for classes to rework authorization
rodrigobr-msft Aug 13, 2025
a547378
Revising oauth refactor with new proposed architecture
rodrigobr-msft Aug 14, 2025
2bab02c
Adding code to connect to AgentApp
rodrigobr-msft Aug 14, 2025
4bd5f45
Generating new unit tests
rodrigobr-msft Aug 18, 2025
eb62f27
Filling in test cases for OAuthFlow and models
rodrigobr-msft Aug 19, 2025
4949b07
Adding more tests
rodrigobr-msft Aug 19, 2025
d64a880
Fixing test cases and catching bugs
rodrigobr-msft Aug 19, 2025
10d5c0c
Another commit
rodrigobr-msft Aug 20, 2025
6db9217
Finishing flow storage client and auth flow tests
rodrigobr-msft Aug 20, 2025
7390df1
Adding more authorization tests
rodrigobr-msft Aug 21, 2025
7a48c90
Adding documentation
rodrigobr-msft Aug 21, 2025
338aed9
Added more Authorizationt tests and fixed inconsistencies in storage …
rodrigobr-msft Aug 21, 2025
d4e7f72
Renaming, restructing, and revising imports
rodrigobr-msft Aug 21, 2025
ad5b91f
Passing all Authorization unit tests
rodrigobr-msft Aug 21, 2025
e3a59e9
Cleaning code and removing unused args
rodrigobr-msft Aug 21, 2025
51b6c17
Fixing test cases and implementing cached client
rodrigobr-msft Aug 21, 2025
81a8169
Added refresh() and adjusted tests
rodrigobr-msft Aug 22, 2025
3619c5d
Aligned more test cases
rodrigobr-msft Aug 22, 2025
0b12daf
Fixed expiration time handling
rodrigobr-msft Aug 22, 2025
90f8542
Changed magic_code keyword to code in tests
rodrigobr-msft Aug 22, 2025
91f2e61
Fixed expiration time issue
rodrigobr-msft Aug 22, 2025
6c3d5c2
Undid TokenResponse changes
rodrigobr-msft Aug 22, 2025
3e47309
Updated logging
rodrigobr-msft Aug 22, 2025
6127b15
Adding some comments
rodrigobr-msft Aug 22, 2025
a21df6a
Removed unused cache field
rodrigobr-msft Aug 22, 2025
d051be0
Added back the __bool__ op on TokenResponse
rodrigobr-msft Aug 22, 2025
3b24383
Revised some comments
rodrigobr-msft Aug 22, 2025
014ce86
Updated default flow duration to 10 minutes
rodrigobr-msft Aug 22, 2025
be7c8db
Changing default flow duration
rodrigobr-msft Aug 22, 2025
63e2334
Resolved merge conflict
rodrigobr-msft Aug 22, 2025
45ec2f4
Reformatted with black
rodrigobr-msft Aug 22, 2025
b38212b
Added pytest-mock as a dependency
rodrigobr-msft Aug 22, 2025
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
2 changes: 1 addition & 1 deletion .azdo/ci-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:

- script: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest black pytest-asyncio build setuptools-git-versioning
python -m pip install flake8 pytest pytest-mock black pytest-asyncio build setuptools-git-versioning
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
displayName: 'Install dependencies'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest black pytest-asyncio build setuptools-git-versioning
python -m pip install flake8 pytest pytest-mock black pytest-asyncio build setuptools-git-versioning
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check format with black
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ class TokenResponse(AgentsModel):
token: NonEmptyString = None
expiration: NonEmptyString = None
channel_id: NonEmptyString = None

def __bool__(self):
return bool(self.token)
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from .activity_handler import ActivityHandler
from .agent import Agent
from .oauth_flow import OAuthFlow
from .card_factory import CardFactory
from .channel_adapter import ChannelAdapter
from .channel_api_handler_protocol import ChannelApiHandlerProtocol
Expand All @@ -20,12 +19,11 @@
from .app.route import Route, RouteHandler
from .app.typing_indicator import TypingIndicator

# OAuth
from .app.oauth.authorization import (
# App Auth
from .app.oauth import (
Authorization,
AuthorizationHandlers,
AuthHandler,
SignInState,
)

# App State
Expand All @@ -44,6 +42,16 @@
from .authorization.jwt_token_validator import JwtTokenValidator
from .authorization.auth_types import AuthTypes

# OAuth
from .oauth import (
FlowState,
FlowStateTag,
FlowErrorTag,
FlowResponse,
FlowStorageClient,
OAuthFlow,
)

# Client API
from .client.agent_conversation_reference import AgentConversationReference
from .client.channel_factory_protocol import ChannelFactoryProtocol
Expand Down Expand Up @@ -88,7 +96,6 @@
__all__ = [
"ActivityHandler",
"Agent",
"OAuthFlow",
"CardFactory",
"ChannelAdapter",
"ChannelApiHandlerProtocol",
Expand Down Expand Up @@ -155,4 +162,10 @@
"StoreItem",
"Storage",
"MemoryStorage",
"FlowState",
"FlowStateTag",
"FlowErrorTag",
"FlowResponse",
"FlowStorageClient",
"OAuthFlow",
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
from .route import Route, RouteHandler
from .typing_indicator import TypingIndicator

# OAuth
from .oauth.authorization import (
# Auth
from .oauth import (
Authorization,
AuthorizationHandlers,
AuthHandler,
SignInState,
AuthorizationHandlers,
)

# App State
Expand Down Expand Up @@ -49,7 +48,6 @@
"TurnState",
"TempState",
"Authorization",
"AuthorizationHandlers",
"AuthHandler",
"SignInState",
"AuthorizationHandlers",
]
Loading