![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Implementation of pyfilesystem2 file system using OneDrive
fs.onedrivefs
can create a requests_oauthlib.OAuth2Session
for you. This way the OAuth2Session
is going to refresh the tokens for you.
onedriveFS = OneDriveFS(
clientId=<your client id>,
clientSecret=<your client secret>,
token=<token JSON saved by oauth2lib>,
SaveToken=<function which saves a new token string after refresh>)
# onedriveFS is now a standard pyfilesystem2 file system
You can handle the tokens outside of the library by passing a requests.Session
.
Here is an example of a custom session using MSAL Python
class MSALSession(OAuth2Session):
def __init__(self, client: msal.ClientApplication):
super().__init__()
self.client = client
def request(self, *args, **kwargs):
account = self.client.get_accounts()[0]
self.token = self.client.acquire_token_silent_with_error(
scopes=["Files.ReadWrite"], account=account
)
return super().request(*args, **kwargs)
client = msal.ConfidentialClientApplication(
client_id=<your client id>,
client_credential=<your client secret>,
authority=f"https://login.microsoftonline.com/<your tenant>",
token_cache=<your token cache>,
)
# Authentication flow to populate the token cache
# YOUR AUTHENTICATION FLOW
session = MSALSession(client=client)
onedriveFS = OneDriveFS(session=session)
# onedriveFS is now a standard pyfilesystem2 file system
Register your app here to get a client ID and secret
FAQs
Pyfilesystem2 implementation for OneDrive using Microsoft Graph API
We found that fs.onedrivefs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.