-
Notifications
You must be signed in to change notification settings - Fork 7
Issue 53534: Support Microsoft's Graph Protocol API for authentication via OAuth2 token #7381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
labkey-bpatel
wants to merge
35
commits into
develop
Choose a base branch
from
fb_mail_transport_via_graph
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
c778ac9
Implement email transport using the Microsoft Graph API and introduce…
labkey-bpatel f054865
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-bpatel e855f46
Add dependencies. Updates for testing.
labkey-bpatel 0e69360
Create getters for the URLs.
labkey-bpatel f10f466
Remove unused dependencies.
labkey-bpatel 2aa8590
Merge remote-tracking branch 'origin/fb_mail_transport_via_graph' int…
labkey-bpatel 34ef547
Add confirmation that an email was sent successfully.
labkey-bpatel 8400794
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-bpatel e481448
Dependencies and versions
labkey-bpatel 69bec71
Add a helper for adding a file attachment
labkey-bpatel 565d551
Use Microsoft SDK to send messages and upload attachments, add junit …
labkey-bpatel f075819
add comments
labkey-bpatel 1459fe2
add comment
labkey-bpatel 35bbddc
Handle data URIs in HTML to comply with Graph's 4MB request limit. Up…
labkey-bpatel a697223
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-bpatel ce46a1a
Remove mockito
labkey-bpatel 9606396
Updates with JMock
labkey-bpatel 5757b1b
Use DataHandler to get the correct content type. Update test with bot…
labkey-bpatel 4998a7b
Exclude dependency on msal4j-persistence-extension
labkey-bpatel 0351964
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-bpatel eb9973e
Revert "exclude group" approach used for resolving dependency conflict
labkey-bpatel 2e2b18c
Handle CC/BCC mapping in buildGraphMessage()
labkey-bpatel 6cd0dc4
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-bpatel 5c73b1b
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-bpatel d558483
Treat CID inline parts without filenames as attachments. Update unit …
labkey-bpatel e42999d
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-bpatel 50d30b7
Code review change - move some of the common setup code to the setup …
labkey-bpatel 01949cf
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-bpatel 27d230c
Code review changes: Code refactor around moving GraphTransportProvid…
labkey-bpatel b84ce8c
cleanup, code review change
labkey-bpatel f8d0d9c
revert unintended change
labkey-bpatel a6df92e
Merge remote-tracking branch 'origin/develop' into fb_mail_transport_…
labkey-adam f023ee1
Update the method name
labkey-bpatel 38c0b9c
Merge remote-tracking branch 'origin/fb_mail_transport_via_graph' int…
labkey-bpatel 86fed50
Add a dynamic warning for multiple email transports
labkey-bpatel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /* | ||
| * Copyright (c) 2026 LabKey Corporation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.labkey.api.util; | ||
|
|
||
| import jakarta.mail.Message; | ||
| import jakarta.mail.MessagingException; | ||
|
|
||
| import java.util.Properties; | ||
|
|
||
| /** | ||
| * Interface for email transport providers (SMTP, Microsoft Graph, etc.). | ||
| * Implementations handle configuration loading and message sending. | ||
| */ | ||
| public interface EmailTransportProvider | ||
| { | ||
| /** | ||
| * @return the display name of this provider for logging purposes | ||
| */ | ||
| String getName(); | ||
|
|
||
| /** | ||
| * Load configuration from startup properties and/or ServletContext. | ||
| * Called once during initialization. | ||
| */ | ||
| void loadConfiguration(); | ||
|
|
||
| /** | ||
| * @return true if this provider is fully configured and ready to send email | ||
| */ | ||
| boolean isConfigured(); | ||
|
|
||
| /** | ||
| * Send an email message using this transport. | ||
| * | ||
| * @param message the message to send | ||
| * @throws MessagingException if sending fails | ||
| */ | ||
| void send(Message message) throws MessagingException; | ||
|
|
||
| /** | ||
| * @return the configuration properties for this provider | ||
| */ | ||
| Properties getProperties(); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@labkey-adam - Does it makes sense to add the warning here, after MailHelper.init()?