-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Radicale Support? #59
Comments
Hi, thanks for trying out the latest version of ical4j-connector. We do have an integration test for Radicale, in which we use a credentials provider rather than user/password: store.connect(new DavSessionConfiguration().withCredentialsProvider(getCredentialsProvider())
.withUser(getUser()).withWorkspace(getWorkspace()))
....
default CredentialsProvider getCredentialsProvider() {
Credentials credentials = new UsernamePasswordCredentials(getUser(), 'test');
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, credentials);
credentialsProvider
} I will need to check why user/password doesn't work, but for now I would suggest using credentials provider with your session configuration. |
Hi, thanks for the quick response.
My code: CalDavCalendarStore store = new CalDavCalendarStore(
"-//Name//iCal4j 1.0//EN",
URI.create(Main.configUtils.getCalDAVDomain()).toURL(),
PathResolver.Defaults.RADICALE);
Credentials credentials = new UsernamePasswordCredentials(Main.configUtils.getCalDAVUser(), Main.configUtils.getCalDAVPassword());
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, credentials);
DavSessionConfiguration davSessionConfiguration = new DavSessionConfiguration().withCredentialsProvider(credentialsProvider);
store.connect(davSessionConfiguration);
System.out.println("Collections");
System.out.println(store.getCollections()); |
@benfortuna Any updates? |
Actually I just had another look at your stacktrace and I can see in my testing this is working for me. Note this is how I configure the DAVSessionConfiguration: new DavSessionConfiguration().withCredentialsProvider(getCredentialsProvider())
.withUser(getUser()).withWorkspace(getWorkspace()) It looks like you may be missing the "user" in addition to credentials provider. This obviously is a bit confusing and probably needs to be fixed, but for now I would put both user and credentials provider. |
Yeah so I'm looking into that as I am seeing the same. It appears the PROPFIND /user call is not returning the collections, so it may be the wrong properties, etc. being requested. Maybe keep this ticket open and I'll update when I have done more testing. |
Okay, thank you! |
Brief Description
I was trying to connect to a Radicale CalDAV Server using ical4j-connector but I wasn't able to.
Context
iCal4j Version:
4.0.0-rc3
iCal4j-connector Version:
2.0.0-alpha5
Docker-Radicale Version:
3.1.8
Action
I was trying to connect to a Radicale server with ical4j-connector using this code:
Result
When I run the code I get an 401 Unauthorized Error even though the user and password is correct.
If I disable the entire authentication in the Radicale config I'm able to connect because it's not possible to get an Error 401 but it can't find and print out any collections which it should. If I try to access a specific collection I get an Error 404 Not Found.
I know there is a issue from 2018 that already states that Radicale doesn't work but I thought I would ask again because Radicale now exists in the PathResolver Defaults so I think this is unwanted behavior.
The text was updated successfully, but these errors were encountered: