Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5350 for branches


Ignore:
Timestamp:
01/21/11 16:26:07 (14 years ago)
Author:
jwolfing
Message:

#1196 added setpassword to the model

Location:
branches/UserManagement
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/UserManagement.dbml

    r5257 r5350  
    7272    </Type>
    7373  </Table>
    74   <Function Name="dbo.aspnet_Membership_ResetPassword" Method="aspnet_Membership_ResetPassword">
     74  <Function Name="dbo.aspnet_Membership_SetPassword" Method="aspnet_Membership_SetPassword">
    7575    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
    7676    <Parameter Name="UserName" Parameter="userName" Type="System.String" DbType="NVarChar(256)" />
    7777    <Parameter Name="NewPassword" Parameter="newPassword" Type="System.String" DbType="NVarChar(128)" />
    78     <Parameter Name="MaxInvalidPasswordAttempts" Parameter="maxInvalidPasswordAttempts" Type="System.Int32" DbType="Int" />
    79     <Parameter Name="PasswordAttemptWindow" Parameter="passwordAttemptWindow" Type="System.Int32" DbType="Int" />
    8078    <Parameter Name="PasswordSalt" Parameter="passwordSalt" Type="System.String" DbType="NVarChar(128)" />
    8179    <Parameter Name="CurrentTimeUtc" Parameter="currentTimeUtc" Type="System.DateTime" DbType="DateTime" />
    8280    <Parameter Name="PasswordFormat" Parameter="passwordFormat" Type="System.Int32" DbType="Int" />
    83     <Parameter Name="PasswordAnswer" Parameter="passwordAnswer" Type="System.String" DbType="NVarChar(128)" />
    8481    <Return Type="System.Int32" />
    8582  </Function>
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/UserManagement.designer.cs

    r5257 r5350  
    118118    }
    119119   
    120     [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Membership_ResetPassword")]
    121     public int aspnet_Membership_ResetPassword([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(256)")] string userName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="NewPassword", DbType="NVarChar(128)")] string newPassword, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="MaxInvalidPasswordAttempts", DbType="Int")] System.Nullable<int> maxInvalidPasswordAttempts, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordAttemptWindow", DbType="Int")] System.Nullable<int> passwordAttemptWindow, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordSalt", DbType="NVarChar(128)")] string passwordSalt, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="CurrentTimeUtc", DbType="DateTime")] System.Nullable<System.DateTime> currentTimeUtc, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordFormat", DbType="Int")] System.Nullable<int> passwordFormat, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordAnswer", DbType="NVarChar(128)")] string passwordAnswer)
    122     {
    123       IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userName, newPassword, maxInvalidPasswordAttempts, passwordAttemptWindow, passwordSalt, currentTimeUtc, passwordFormat, passwordAnswer);
     120    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Membership_SetPassword")]
     121    public int aspnet_Membership_SetPassword([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(256)")] string userName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="NewPassword", DbType="NVarChar(128)")] string newPassword, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordSalt", DbType="NVarChar(128)")] string passwordSalt, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="CurrentTimeUtc", DbType="DateTime")] System.Nullable<System.DateTime> currentTimeUtc, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordFormat", DbType="Int")] System.Nullable<int> passwordFormat)
     122    {
     123      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userName, newPassword, passwordSalt, currentTimeUtc, passwordFormat);
    124124      return ((int)(result.ReturnValue));
    125125    }
  • branches/UserManagement/HeuristicLab.Services.Authentication.ServiceClients/HeuristicLab.Services.Authentication.ServiceClient.csproj

    r5257 r5350  
    7070  </ItemGroup>
    7171  <ItemGroup>
    72     <None Include="app.config" />
     72    <None Include="app.config">
     73      <SubType>Designer</SubType>
     74    </None>
    7375    <None Include="HeuristicLab.snk" />
    7476    <None Include="ServiceClients\GenerateServiceClients.cmd" />
  • branches/UserManagement/HeuristicLab.Services.Authentication/AuthenticationService.cs

    r5257 r5350  
    145145
    146146
    147     // TODO !!!
     147
    148148    public User ResetPassword(string applicationName, string userName, string password) {
    149149
    150150      string salt = "";
    151       string answer = "";
    152 
    153       using (UserManagementDataContext db = new UserManagementDataContext()) {
    154         db.aspnet_Membership_ResetPassword(applicationName, userName, password, null, null, salt, null, null, answer);
     151      int format = 1; //Password format (0=Plaintext, 1=Hashed, 2=Encrypted)
     152
     153      using (UserManagementDataContext db = new UserManagementDataContext()) {
     154        db.aspnet_Membership_SetPassword(applicationName, userName, password, salt, DateTime.UtcNow, format);
    155155        return null;
    156156      }
Note: See TracChangeset for help on using the changeset viewer.