public override OpenID20.AuthenticationRequest createAuthenticationRequest(SVX.Channel client) { AuthenticationRequest AuthenticationRequest = new AuthenticationRequest(); AuthenticationRequest.openid__mode = "checkid_setup"; AuthenticationRequest.openid__identity = "http://specs.openid.net/auth/2.0/identifier_select"; AuthenticationRequest.openid__claimed_id = "http://specs.openid.net/auth/2.0/identifier_select"; AuthenticationRequest.openid__assoc_handle = "blah_blah"; AuthenticationRequest.openid__return_to = return_to_uri; AuthenticationRequest.openid__ns__oauth = "http://specs.openid.net/extensions/oauth/1.0"; AuthenticationRequest.openid__oauth__consumer = Config.config.AppRegistration.Yahoo.clientID; // Yahoo doesn't seem to support OpenID extensions, so the next line is commented out //AuthenticationRequest.openid__sreg__required = "email,fullname"; //AuthenticationRequest.openid__sreg__policy_url = "http://a.com/foo.html"; AuthenticationRequest.openid__ns__ax = "http://openid.net/srv/ax/1.0"; AuthenticationRequest.openid__ax__mode = "fetch_request"; AuthenticationRequest.openid__ax__type__email = "http://axschema.org/contact/email"; //"http://schema.openid.net/contact/email"; // AuthenticationRequest.openid__ax__type__fullname = "http://axschema.org/namePerson"; AuthenticationRequest.openid__ax__required = "email,fullname"; var stateParams = new OpenID20.StateParams { client = client, idpPrincipal = idpParticipantId.principal }; AuthenticationRequest.CSRF_state = stateGenerator.Generate(stateParams, SVX_Principal); return(AuthenticationRequest); }
public override OAuth20.AuthorizationRequest createAuthorizationRequest(SVX.Channel client) { GGAuthenticationRequest GGAuthenticationRequest = new GGAuthenticationRequest(); GGAuthenticationRequest.client_id = client_id; GGAuthenticationRequest.response_type = "id_token token"; GGAuthenticationRequest.scope = "openid email profile"; GGAuthenticationRequest.redirect_uri = redirect_uri; GGAuthenticationRequest.response_mode = "form_post"; var stateParams = new OAuth20.StateParams { client = client, idpPrincipal = idpParticipantId.principal }; GGAuthenticationRequest.state = stateGenerator.Generate(stateParams, SVX_Principal); HashAlgorithm hashAlgo = SHA1.Create(); GGAuthenticationRequest.nonce = BitConverter.ToString(hashAlgo.ComputeHash(System.Text.Encoding.UTF8.GetBytes(client.id))); return(GGAuthenticationRequest); }
public abstract AuthenticationRequest createAuthenticationRequest(SVX.Channel client);