Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

cannot convert from 'Unosquare.Labs.EmbedIO.BearerToken.BearerTokenModule' to 'Unosquare.Labs.EmbedIO.IWebModule' #2

Closed
afsharm opened this issue May 26, 2016 · 3 comments

Comments

@afsharm
Copy link

afsharm commented May 26, 2016

Hi,
My .Net 4.5 app is using EmbedIO 1.0.19 and EmbedIO.BearerToken 1.0.0 packages from nuget. With this code:

            var basicAuthProvider = new BasicAuthorizationServerProvider();
            var routes = new[] { "" };
            server.RegisterModule(new BearerTokenModule(basicAuthProvider, routes));

I get error: cannot convert from 'Unosquare.Labs.EmbedIO.BearerToken.BearerTokenModule' to 'Unosquare.Labs.EmbedIO.IWebModule'

How can I correct it?

@geoperez
Copy link
Member

Hi @afsharm , you are right, the BearerTokenModule was expecting an older EmbedIO version. I just published a new EmbedIO.BearerToken Nuget, please update your project and let me know if it works.

@afsharm
Copy link
Author

afsharm commented May 27, 2016

Hi @geoperez, Thank you very much for your quick response. New nugets solved the problem. Now my selected requests are secured correctly.

Can I ask you what is recommended way for generating a Bearer Token regarding embedio?

@afsharm afsharm closed this as completed May 27, 2016
@geoperez
Copy link
Member

The Bearer token is generated using the standard JSON Web Tokens (https://jwt.io/introduction/).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants