Skip to content

Authentication #34

@JamesM85

Description

@JamesM85

Hi,
Has there been any further progress on this project? I have been trying to get it to work on my windows phone, which it does locally but not remotely.

It doesn't appear that the original code save the credentials or attempted to pass them to the uri.

I've got to the stage now where they are saving and I'm trying to pass them to openhab here:

    public Uri ResolveRemoteUrl()
    {
        if (string.IsNullOrEmpty(RemoteHostname))
            return null;

        try
        {
            var scheme = UseHttps ? "https" : "http";
            UriBuilder builder;
            if (PortNumber.HasValue)
                builder = new UriBuilder(scheme, RemoteHostname, PortNumber.Value);

            else
                builder = new UriBuilder(scheme, RemoteHostname);

            builder.UserName = Username;   /// Added for Authentication
            builder.Password = Password;     /// Added for Authentication

            return builder.Uri;
        }
        catch
        {
            return null;
        }
    }

But it seems to fail. Any progress updates would be really appreciated. I'd love to get some sort of working windows phone interface for openhab.

James

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions