Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change scope/permissions with Microsoft.Web.WebPages.OAuth

Is there a way to change the scope/permission when using Microsoft.Web.WebPages.OAuth? The most logical place is when registering the client with OAuthWebSecurity.RegisterClient. I thought that the adding scope to the extraData parameter would possibly work, but I didn't have success with that.

like image 431
Josh C Avatar asked Jul 24 '12 17:07

Josh C


2 Answers

Microsoft.Web.WebPages.OAuth does not expose the scope when authorizing with a client. I ended up adding custom DotNetOpenAuth clients to include my necessary scope.

like image 182
Josh C Avatar answered Oct 16 '22 07:10

Josh C


The extradata is something you can pass about the provider and use it in tehe UI layer. For eg. extra data could be the icon to display when listing the provider to use for login. Following post shows how you can write your own provider and plug it into your site http://blogs.msdn.com/b/webdev/archive/2012/08/23/plugging-custom-oauth-openid-providers.aspx

like image 41
pranav rastogi Avatar answered Oct 16 '22 08:10

pranav rastogi