I’m using the OracleMembershipProvider with Oracle11g and ASP.NET 4.0. Creating users from the ASP.NET side is easy, but I’m not quite sure how to do it from an Oracle stored procedure.
I’ve found the ora_aspnet_Mem_CreateUser function. However, it’s wrapped and I can’t find any documentation for it, so I’m not sure what all the parameters take. Also, when you call CreateUser from ASP.NET, there’s an out parameter with a “MembershipCreateStatus enumeration value indicating whether or not the user was created successfully.” The only out parameter for ora_aspnet_Mem_CreateUser is userid, so can I even get access to the status value?
I did find this answer, which is mostly what I’m trying to do, but in T-SQL. I need to do it in PL-SQL, and if possible I need to determine if the user was successfully created.
Using Reflector I discovered that the MembershipCreateStatus out parameter is part of the ASP.NET function, so if you want something similar in an Oracle function, you have to write it yourself.
I got everything to work in PL-SQL except the hashing, so a co-worker wrote the hashing function in Java: