message de retour à l'envoi du jeton Google

This commit is contained in:
2015-12-19 15:12:42 +01:00
parent 979d577d2a
commit 1cb3a692ef
10 changed files with 74 additions and 18 deletions

View File

@ -106,7 +106,7 @@ rsync_yavsc:
rsync_TotemProd: rsync_TotemProd:
nuget_restore: nuget_restore:
for prj in ITContentProvider NpgsqlBlogProvider NpgsqlContentProvider NpgsqlMRPProviders Presta SalesCatalog TestAPI web WebControls yavscclient yavscModel; do nuget restore "$${prj}/packages.config" -SolutionDirectory . ; done for prj in ITContentProvider NpgsqlBlogProvider NpgsqlContentProvider NpgsqlMRPProviders Presta SalesCatalog TestAPI web WebControls yavscclient yavscModel; do if [ -f "$${prj}/packages.config" ]; then nuget restore "$${prj}/packages.config" -SolutionDirectory . ; fi; done
nuget_update: nuget_update:
for prj in ITContentProvider NpgsqlBlogProvider NpgsqlContentProvider NpgsqlMRPProviders Presta SalesCatalog TestAPI web WebControls yavscclient yavscModel; do nuget update "$${prj}/packages.config" ; done for prj in ITContentProvider NpgsqlBlogProvider NpgsqlContentProvider NpgsqlMRPProviders Presta SalesCatalog TestAPI web WebControls yavscclient yavscModel; do nuget update "$${prj}/packages.config" ; done

View File

@ -19,6 +19,7 @@
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
using System; using System;
using System.Web.Http;
using Yavsc.Model.Google; using Yavsc.Model.Google;
using Yavsc.Model.Calendar; using Yavsc.Model.Calendar;
using Yavsc.Helpers; using Yavsc.Helpers;
@ -41,6 +42,7 @@ namespace Yavsc.ApiControllers
/// </summary> /// </summary>
/// <param name="evpub">Evpub.</param> /// <param name="evpub">Evpub.</param>
[Authorize(Roles="BackOffice")] [Authorize(Roles="BackOffice")]
[AcceptVerbs("POST")]
public MessageWithPayloadResponse NotifyEvent(EventPub evpub) { public MessageWithPayloadResponse NotifyEvent(EventPub evpub) {
return GoogleHelpers.NotifyEvent(evpub); return GoogleHelpers.NotifyEvent(evpub);
} }
@ -50,10 +52,15 @@ namespace Yavsc.ApiControllers
/// </summary> /// </summary>
/// <param name="registrationId">Registration identifier.</param> /// <param name="registrationId">Registration identifier.</param>
[Authorize] [Authorize]
public void SetRegistrationId(string registrationId) [AcceptVerbs("GET")]
public string SetRegistrationId(string registrationId)
{ {
// TODO set registration id // TODO set registration id
setRegistrationId (User.Identity.Name, registrationId); if (string.IsNullOrWhiteSpace(registrationId))
return "Registration id cannot be blank";
var username = User.Identity.Name;
setRegistrationId (username, registrationId);
return "Saved registration for user:"+username;
} }
private void setRegistrationId(string username, string regid) { private void setRegistrationId(string username, string regid) {

View File

@ -99,6 +99,7 @@ namespace Yavsc
WebApiConfig.Register (GlobalConfiguration.Configuration); WebApiConfig.Register (GlobalConfiguration.Configuration);
RegisterRoutes (RouteTable.Routes); RegisterRoutes (RouteTable.Routes);
AjaxHelper.GlobalizationScriptPath = "~/Scripts/globalize"; AjaxHelper.GlobalizationScriptPath = "~/Scripts/globalize";
} }
/// <summary> /// <summary>

View File

@ -0,0 +1,32 @@
//
// Startup.Auth.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
namespace Yavsc
{
public class Startup
{
public Startup ()
{
}
}
}

View File

@ -58,12 +58,17 @@ fieldset, .performer {
} }
h1 { h1 {
background-color: rgba(256,256,256,.2); background-color: rgba(0,0,0,.2);
padding: 1em; padding: 1em;
color:white; color:white;
transition: color 1s; transition: color 1s;
} }
main h1 {
background-color: rgba(256,256,256,.3);
padding: 1em;
color:black;
transition: color 1s;
}
.postpreview { .postpreview {
background-color: rgba(233,233,233,0.8); background-color: rgba(233,233,233,0.8);
animation-name: slideInDown; animation-name: slideInDown;

View File

@ -58,12 +58,19 @@ fieldset, .performer {
} }
h1 { h1 {
background-color: rgba(256,256,256,.2); background-color: rgba(0,0,0,.2);
padding: 1em; padding: 1em;
color:white; color:white;
transition: color 1s; transition: color 1s;
} }
main h1 {
background-color: rgba(256,256,256,.3);
padding: 1em;
color:black;
transition: color 1s;
}
.postpreview { .postpreview {
background-color: rgba(233,233,233,0.8); background-color: rgba(233,233,233,0.8);
animation-name: slideInDown; animation-name: slideInDown;

View File

@ -45,6 +45,7 @@ main {
display: block; display: block;
text-align: center; text-align: center;
} }
.post { text-align: left; }
main video, main img { main video, main img {
max-width:100%; max-width:100%;
max-height:75%; max-height:75%;

View File

@ -148,7 +148,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
<add name="gtokenexpir" type="System.DateTime" defaultValue="2008-01-01 1:00:00Z" /> <add name="gtokenexpir" type="System.DateTime" defaultValue="2008-01-01 1:00:00Z" />
<add name="gcalapi" type="System.Boolean" defaultValue="false" /> <add name="gcalapi" type="System.Boolean" defaultValue="false" />
<add name="gcalid" /> <add name="gcalid" />
<add name="gregid" allowAnonymous="true" /> <add name="gregid" />
<add name="allowcookies" type="System.Boolean" allowAnonymous="true" defaultValue="false" /> <add name="allowcookies" type="System.Boolean" allowAnonymous="true" defaultValue="false" />
<add name="UITheme" allowAnonymous="true" defaultValue="clear" /> <add name="UITheme" allowAnonymous="true" defaultValue="clear" />
<add name="Rate" type="System.Int32" defaultValue="100" /> <add name="Rate" type="System.Int32" defaultValue="100" />
@ -221,7 +221,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
</settings> </settings>
<mailSettings> <mailSettings>
<smtp deliveryMethod="network" from="paulschneider@free.fr"> <smtp deliveryMethod="network" from="paulschneider@free.fr">
<network host="[YOUR_SMTP_HOST]" port="25" defaultCredentials="false" /> <network host="smtp.free.fr" port="25" defaultCredentials="false" />
</smtp> </smtp>
</mailSettings> </mailSettings>
</system.net> </system.net>
@ -246,7 +246,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
<!-- --> <!-- -->
<add name="clientId" value="A9S6jrem3H0gdj8tQ2q1ahSCU38tAJRyiro7eED13h3Syn6C9ZSKSRkl" /> <add name="clientId" value="A9S6jrem3H0gdj8tQ2q1ahSCU38tAJRyiro7eED13h3Syn6C9ZSKSRkl" />
<!-- --> <!-- -->
<add name="clientSecret" value="[YOUR_PAYPAL_SECRET]" /> <add name="clientSecret" value="PLF77VGTZGGSSZAY" />
<!-- --> <!-- -->
</settings> </settings>
</paypal> </paypal>
@ -265,22 +265,22 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
</root> </root>
</log4net> </log4net>
<connectionStrings> <connectionStrings>
<add name="yavsc" connectionString="[YOUR_CONNECTION_STRING]" providerName="Npgsql" /> <add name="yavsc" connectionString="Server=127.0.0.1;Port=5432;Database=YavscDev;User Id=yavscdev;Password=admin;" providerName="Npgsql" />
</connectionStrings> </connectionStrings>
<appSettings> <appSettings>
<!-- <add key="MonoServerDefaultIndexFiles" value="Index,index.html,Index.aspx" /> --> <!-- <add key="MonoServerDefaultIndexFiles" value="Index,index.html,Index.aspx" /> -->
<add key="WorkflowContentProviderClass" value="yavsc.NpgsqlContentProvider" /> <add key="WorkflowContentProviderClass" value="yavsc.NpgsqlContentProvider" />
<add key="AdminEMail" value="[YOUR_ADMIN_EMAIL]" /> <add key="AdminEMail" value="contact@pschneider.fr" />
<add key="OwnerEMail" value="[YOUR_OWNER_EMAIL]" /> <add key="OwnerEMail" value="paul@pschneider.fr" />
<add key="Name" value="[YOUR_SITE_NAME]" /> <add key="Name" value="Yasvc dev" />
<add key="Themes" value="clear,dark,itdark,itclear,blue,green,base" /> <add key="Themes" value="clear,dark,itdark,itclear,blue,green,base" />
<add key="DefaultAvatar" value="/App_Themes/images/noavatar.png;image/png" /> <add key="DefaultAvatar" value="/App_Themes/images/noavatar.png;image/png" />
<add key="RegistrationMessage" value="/RegistrationMail.txt" /> <add key="RegistrationMessage" value="/RegistrationMail.txt" />
<!-- <add key="ClientValidationEnabled" value="true" /> <!-- <add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> --> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> -->
<add key="PayPalLogger" value="PayPal.Log.Log4netLogger" /> <add key="PayPalLogger" value="PayPal.Log.Log4netLogger" />
<add key="GOOGLE_API_KEY" value="[YOUR_GOOGLE_API_KEY]" /> <add key="GOOGLE_API_KEY" value="AIzaSyCF7Bgz-W_p26bbMzxp1ukdgg3LMDHzAo0" />
<add key="GOOGLE_CLIENT_ID" value="[YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com]" /> <add key="GOOGLE_CLIENT_ID" value="325408689282-6bekh7p3guj4k0f3301a6frf025cnrk1.apps.googleusercontent.com" />
<add key="GOOGLE_CLIENT_SECRET" value="[YOUR_GOOGLE_CLIENT_SECRET]" /> <add key="GOOGLE_CLIENT_SECRET" value="MaxYcvJJCs2gDGvaELZbzwfL" />
</appSettings> </appSettings>
</configuration> </configuration>

View File

@ -29,6 +29,7 @@ using System.Web.Routing;
using Yavsc.Formatters; using Yavsc.Formatters;
using Yavsc.Model.FrontOffice; using Yavsc.Model.FrontOffice;
using System.Web.Http; using System.Web.Http;
using System.IdentityModel;
namespace Yavsc namespace Yavsc
{ {
@ -60,6 +61,7 @@ namespace Yavsc
routeTemplate: WebApiConfig.UrlPrefix + "/{controller}/{action}/{id}", routeTemplate: WebApiConfig.UrlPrefix + "/{controller}/{action}/{id}",
defaults: new { action="Index", id = RouteParameter.Optional } defaults: new { action="Index", id = RouteParameter.Optional }
); );
} }
} }

View File

@ -10,6 +10,7 @@
<package id="log4net" version="2.0.4" targetFramework="net451" /> <package id="log4net" version="2.0.4" targetFramework="net451" />
<package id="Microsoft.jQuery.Unobtrusive.Ajax" version="3.2.3" targetFramework="net451" /> <package id="Microsoft.jQuery.Unobtrusive.Ajax" version="3.2.3" targetFramework="net451" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net451" /> <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net451" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net451" />
<package id="Mono.Web.Xdt" version="1.0.0" targetFramework="net451" /> <package id="Mono.Web.Xdt" version="1.0.0" targetFramework="net451" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="Npgsql" version="3.0.4" targetFramework="net451" /> <package id="Npgsql" version="3.0.4" targetFramework="net451" />
@ -22,4 +23,4 @@
<package id="xunit.core" version="2.1.0" targetFramework="net451" /> <package id="xunit.core" version="2.1.0" targetFramework="net451" />
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net451" /> <package id="xunit.extensibility.core" version="2.1.0" targetFramework="net451" />
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net451" /> <package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net451" />
</packages> </packages>