How can I get the "realm" value of a SVN repository?

365 Views Asked by At

To my knowledge, when working with SVN repositories there exists a file called "svnserve.conf", which among its properties there exist the "realm" value.

If you have a local repository, I guess you can create this file and then set this value.

My question is this, if I'm using an SVN repository of a third party provider; how can I get the "realm" value using SVNKit in Java? Is this possible?

1

There are 1 best solutions below

0
On

I've not used SVNKit before, but it looks like the realm is provided to an instance of ISVNAuthenticationManager, which you can implement. There's also BasicAuthenticationManager which you might use as a reference.

You can use SVNRepository.setAuthenticationManager() to specify a ISVNAuthenticationManager of your choosing that captures the realm and other information you might need.