Designänderungen und Tokengenerierungsfunktion
This commit is contained in:
@@ -72,19 +72,19 @@
|
||||
<form id="form1" runat="server">
|
||||
<center>
|
||||
<table id="tbl_main" cellpadding="0">
|
||||
<tr style="background-color:#fff; color:#003680;height:30px;">
|
||||
<tr style="color:#003680;height:35px;">
|
||||
<td>
|
||||
<asp:Button ID="btn_Back" runat="server" Text="Back" PostBackUrl="~/login/login_FLEX.aspx" OnClick="btn_Back_Click"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:30px;font-size:12px">
|
||||
<td align="center" colspan="2" style="color:#fff;font-kerning:auto;font-weight:700;">
|
||||
<asp:Label ID="lbl_PWvergessen" Text="Haben Sie ihr Passwort vergessen?" runat="server" style=" background-color:#fff; color:#003680; font-size:12px"></asp:Label>
|
||||
<asp:Label ID="lbl_PWvergessen" Text="Haben Sie ihr Passwort vergessen?" runat="server" style="color:#003680; font-size:15px"></asp:Label>
|
||||
</td></tr>
|
||||
<!-- <tr style=" background-color:#fff; color:#003680; height:30px;font-size:12px">
|
||||
<td align="center" colspan="2" style="color:#fff;font-kerning:auto;font-weight:700;">
|
||||
<asp:Label ID="Label1" Text="Geben Sie Ihre hinterlegte E-Mail-Adresse ein, um einen Link zum Rücksetzen des Passwortes zu erhalten." runat="server" style=" background-color:#fff; color:#003680; font-size:12px"></asp:Label>
|
||||
</td></tr> -->
|
||||
</td></tr> -->
|
||||
<tr style="color:#003680; height:30px;">
|
||||
<td align="right" colspan="2">
|
||||
<h1>Passwort vergessen:</h1>
|
||||
|
||||
@@ -106,7 +106,23 @@ Partial Class login_ForgotPW
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Function genToken() As String
|
||||
Dim time() As Byte = BitConverter.GetBytes(DateTime.UtcNow.ToBinary())
|
||||
Dim Key() As Byte = Guid.NewGuid().ToByteArray()
|
||||
Dim token As String = Convert.ToBase64String(time.Concat(Key).ToArray())
|
||||
Return token
|
||||
End Function
|
||||
|
||||
Function getDateoftoken(tokenname As String) As Boolean
|
||||
Dim data() As Byte = Convert.FromBase64String(tokenname)
|
||||
Dim wenn As DateTime = DateTime.FromBinary(BitConverter.ToInt64(data, 0))
|
||||
If wenn < DateTime.UtcNow.AddHours(-24) Then
|
||||
Return False
|
||||
MsgBox("Token nicht gefunden oder zu alt!" + Environment.NewLine + "Bitte erneut Mail senden!")
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Protected Sub txtEmail_TextChanged(sender As Object, e As EventArgs)
|
||||
regexval_txt_Email.Validate()
|
||||
|
||||
Reference in New Issue
Block a user