Hi Vangelis,
Thanks for getting in touch, it’s great to hear that the extension functionality is being put to use and sorry that some of our documentation isn’t up to date yet. This is our initial step into providing extensibility in the server, and there may be a little volatility as we iron out some of the wrinkles. To that end, we are in the process of making some updates to the providers and the hosting setup to fix some issues that arose with the new providers when the server was behind a reverse proxy or load balancer. So let me first answer your questions based on the code you’re currently working from and then I’ll explain some of the changes (which actually went into the repos for the providers last night our time and is in the process of being tested in the server as a matter of priority).
So firstly, the authenticationLink is a property on an Angular controller that we wrap around the UI that the provider returns. It handles adding the redirectTo parameter to the “Authenticate” link returned in the AuthenticationProviderElement from the provider. Regarding the integration testing, unfortunately we don’t have a robust way of doing this yet, but is something we would certain like to have in the future.
Documentation around this was coming, and we’ve increased the priority on getting this done. It will cover the updated setup.
Which brings us to Extensibility v2.0. The core part of what’s changed is that the server no longer builds any absolute paths, because behind a reverse proxy that doesn’t work. So as an example, in the UserAuthenticationAction that you’ve been looking at you’ll see
var directoryPathResult = context.Request.AbsoluteVirtualDirectoryPath();
and that’s used later in a call to the UriBuilder to come up with the parameter to be passed to the external provider as the redirect_uri. We’ve changed that so the client passes us the URL from it’s perspective, which prevents the issues with the reverse proxy changing the request, and the server returns that rather than redirecting. The client does the redirect once it gets the values back.
To remove some of the mystery around what’s happening on the javascript side, the updated providers now use Angular modules to return the UI code. This way you can see exactly what’s happening, and can change it if you need to. There are a couple of values that can be bound into the directive and the doco will explain in detail what each is for. The doco is underway but it not yet publicly visible, once it is you’ll be able to find it in the Server Extensibility section of our doco.
I hope this helps. As I mentioned we’re working on getting the server tested and released as a priority, so hopefully it shouldn’t be too long. If I can be of further assistance please let me know.
Shannon