Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| public partial class Elmah : DbMigration | |
| { | |
| public override void Up() | |
| { | |
| Sql(CreateTable_ELMAH_Error); | |
| Sql(CreatreProcedure_ELMAH_GetErrorXml); | |
| Sql(CreateProcedure_ELMAH_GetErrorsXml); | |
| Sql(CreateProcedure_ELMAH_LogError); | |
| } | |
| // for detailed comments and demo, see my SO answer here http://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional/21915381#21915381 | |
| /* a helper to execute an IF statement with any expression | |
| USAGE: | |
| -- Yes you NEED to properly escape the string literals, or just alternate single and double quotes | |
| -- to access any global function or property you should use window.functionName() instead of just functionName() | |
| -- this example assumes you passed this context to your handlebars template( {name: 'Sam', age: '20' } ), notice age is a string, just for so I can demo parseInt later | |
| <p> | |
| {{#xif " name == 'Sam' && age === '12' " }} | |
| BOOM |
| public class PostalEmail<T> : Email where T : IEmail | |
| { | |
| public PostalEmail(string viewName, T model) | |
| : base(viewName) | |
| { | |
| To = model.To; | |
| Email = model; | |
| } | |
| public string To { get; private set; } |