Hi Team I was referring the bellow link : https://jackrabbit.apache.org/jcr/jcr-client-application-howto.html
But the sample is not enough. I am trying to get my webdav to be working, but I am unable to access wevdav via java client. Can someone please help me with repository.xml spec + jackrabbit-webapps' web.xml and the sample java client to access webdav servlet of jackrabbit. On Fri, Jun 14, 2019 at 1:36 PM jimy page <[email protected]> wrote: > i am not sure it's possible to directly create tokens with jackrabbit upon > user creation... the default way is to trigger token creation upon regular > login by passing a empty token attribute along with the SimpleCredentials. > subsequent logins would then be performed with TokenCredentials (see > Jackrabbit API).*-----> So I can not really implement proper let's say > JWT token based authentication, rather I assume Jackrabbit creates a notion > of token based authentication ? How clients are going to pass in token in > case of token based login ? because repository.login() takes credentials, > how do I pass token in that method ?* > > JackrabbitSession.getUserManager() -> UserManager.createUser. ---> > * I will check this. Because for me Repository repository = > JcrUtils.getRepository("http://localhost:8090/server > <http://localhost:8090/server>"); ---> this does not seem to be working. * > > Please let me know your input on this. > > > Thanks > Jimmy > > > On Fri, Jun 14, 2019 at 12:32 PM Angela Schreiber > <[email protected]> wrote: > >> hi jimmy >> >> i am not sure it's possible to directly create tokens with jackrabbit >> upon user creation... the default way is to trigger token creation upon >> regular login by passing a empty token attribute along with the >> SimpleCredentials. subsequent logins would then be performed with >> TokenCredentials (see Jackrabbit API). >> >> as far as user creation is concerned, i would recommend to use the >> Jackrabbit API. in other words: >> JackrabbitSession.getUserManager() -> UserManager.createUser. >> >> kind regards >> angela >> >> ________________________________________ >> From: jimy page <[email protected]> >> Sent: Friday, June 14, 2019 8:28 AM >> To: [email protected] >> Subject: Re: Enable token based login / authentication in jackrabbit >> 2.19/18 >> >> Thanks Angela for your reply. >> >> >> I have few questions. >> >> 1. While creating users through userManagers this is what I am using: >> config = RepositoryConfig.install(new File("/Users/xxx/jackrabbit/")); >> >> after that we do repository.login(). >> Now there are 3 variants of repository.login() none of which takes token, >> it takes New Credentials(username, password). >> >> So here is my question: >> 1. While creating users, how do I create tokens as well ? >> 2. How do clients call repository.login() methods, passing token. >> >> PS. I am unable to login to webdav url: >> >> Repository repository = JcrUtils.getRepository(" >> http://localhost:8090/server"); >> >> This always gives error. where in through browser I can access repository. >> >> What is the best practice to create users, >> >> a> RepositoryConfig.install >> >> b>or >> JcrUtils.getRepository("http://localhost:8090/server" >> >> the second one does not seem to be working for me. >> >> Thanks >> >> Jimmy >> >> >> >> >> On Thu, Jun 13, 2019 at 8:06 PM Angela Schreiber >> <[email protected]> >> wrote: >> >> > hi >> > >> > as far as i remember it's enabled by default in jackrabbit 2.x (in >> > contrast to jackrabbit oak where token authentication is handled by a >> > separate loginmodule implementation). in other words: if i am not >> mistaken >> > it should work out of the box with >> > org.apache.jackrabbit.core.security.authentication.DefaultLoginModule. >> upon >> > the first default login you have to make sure a token is created (empty >> > token attribute) such that subsequent logins can use TokenCredentials >> with >> > the token created. >> > >> > you may also consult >> > >> org.apache.jackrabbit.core.security.authentication.token.TokenBasedAuthentication >> > for further details. >> > >> > in general i would recommend using Apache Jackrabbit Oak, which is the >> > successor of the Apache Jackrabbit >> > >> > hope that helps >> > angela >> > ________________________________________ >> > From: jimy page <[email protected]> >> > Sent: Thursday, June 13, 2019 10:26 AM >> > To: [email protected] >> > Subject: Enable token based login / authentication in jackrabbit 2.19/18 >> > >> > Dear Jackrabbit team >> > >> > I need to implement token based authentication on my jackrabbit server. >> > Could you please guide me how do I do it ? I have not been able to find >> > enough documentation / example to enable token based authentication. >> > >> > Some guidance/ sample code will be great help. >> > >> > >> > Thanks >> > Jimmy >> > >> >
