(copied from https://github.com/owncloud/core/issues/24794#issuecomment-222933509)
With multiple authentication mechanisms available, clients need to know which one is used to either prompt for for login credentials or open an URL in an external browser.
These are the auth mechanisms we support:
These are the token generation mechanisms we support:
These are the setups that we need to support:
We need to find a way for clients to detect which auth mechanisms and token generation mechanisms are supported. As discussed with @PVince81 we think that a special info route could be used to return that info. E.g. the client sends a request to /auth/info and gets a list of auth mechanisms and/or token generation mechanisms it can choose from. That route must be accessible without user credentials.
@guruz @PhilippSchaffrath @davivel is this still needed with OAuth2 ?
I propose that we return in status.php (unauthed. can't use capabilities which is authed) that we support OAuth2, possibly with an endpoint if needed.
legacy: If this is not returned in status.php we just do the old HTTP auth.
legacy: If status.php is redirect we use Shibboleth/SAML
I propose that we return in status.php (unauthed. can't use capabilities which is authed) that we support OAuth2, possibly with an endpoint if needed.
OK to me.
legacy: If status.php is redirect we use Shibboleth/SAML
This will not work; as you said, status.php is unauthed, so there will be no redirection to the IdP.
For legacy, I would just keep the detection how it is right now. In mobile clients we send an unauthenticated HEAD to the remote.php/webdav.
Sorry, I mixed this up. You are right.
(@ogoffart for review)
In mobile clients we send an unauthenticated HEAD to the remote.php/webdav.
I'll go further. We are using this even to dectect OAuth2 authentication. We expect these types of responses:
@davivel I need to check if Qt gives us control/access to this header :/ It might be abstracted away
Sad to read it, @guruz ...
@PhilippSchaffrath might be relevant in the context of OAuth2
I suppose we can just query the OAuth endpoint and see if it's there. -> Oauth
Otherwise we do as before.
From clients perspective, an important detail is defining the default behaviour when different auth methods are supported in the server, as will be the case in the short term.
If server is OAuth-capable and Basic-capable, should the app default to request OAuth to the user? Will this be a hard request, or will the app allow the user to switch to Basic in the login-view/wizard?
I don't have a strong opinion about it, though in general I prefer let the user some options.
moving to triage
Is this still relevant ? How does it currently work with OAuth ?
If capability announces OAuth, then clients use OAuth
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I suppose we can just query the OAuth endpoint and see if it's there. -> Oauth
Otherwise we do as before.