asp.net mvc 3 - Google OpenId: Accept only users of a particular company -


i trying use open id in application , have done dotnetopenid.

now, google provides service email , others under domain of companies. (like example@acompany.com). there way narrow down authentication users of company only?

i know can checking email address response. not think idea. better if user not authenticated google accounts other of acompany.com.

please note donot know inside logic of open authentication or dotnetopenid.

edit

by default google's openid request prompts https://accounts.google.com/servicelogin?...

i can manually change (in browser) https://accounts.google.com/a/iit.du.ac.bd/servicelogin?... , works (iit.du.ac.bd school's domain)

i have tried create request with

        identifier id1 = identifier.parse("https://www.google.com/a/iit.du.ac.bd");         identifier id2= identifier.parse("https://www.google.com/a/iit.du.ac.bd/accounts/o8/id");         var openid = new openidrelyingparty();         iauthenticationrequest request1 = openid.createrequest(id1);        iauthenticationrequest request2 = openid.createrequest(id2); 

google's identifier https://www.google.com/accounts/o8/id"

edit2

just found google-apps-openid-url

your hesitation on using email addresses filter absolutely correct. follow instinct. :)

you should filter on op endpoint. not assure google provider, google has dedicated op endpoint each individual domain, can check that.

iauthenticationresponse response = relyingparty.getresponse(); if (response != null) {     if (response.provider.uri.absoluteuri == "http://google.com/o8/....?domain=yourcompany.com") {         // allow     } else {         // disallow     } } 

something that. you'll have test see actual uri case you're expecting.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -