Jump to content

Obi1-Cannabis

Members
  • Content count

    146
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Obi1-Cannabis

  • Rank
    Member
  • Birthday 08/15/1985

Contact Methods

  • MSN
    Obi1-Cannabis@hotmail.com
  • ICQ
    0

Profile Information

Previous Fields

  • Languages
    HTML, CSS, JavasScript, PHP, .NET
  1. Is it possible to extend the OAuthGrantResourceOwnerCredentialsContext class from Microsoft.Owin.Security.OAuth? when implementing my custom OAuthProvider I want to be able to add a new IList to the context in order to send messages that will be intercepted by Growl in AngularJs. what i want to do in case of an error for example is something like: public class CustomOAuthProvider : OAuthAuthorizationServerProviderExtended{ //removed code for brevity public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContextExtended context) { //removed code for brevity ApplicationUser user = await userManager.FindAsync(context.UserName, context.Password); if (user == null) { context.messages.Add(GeneralEx.CreateGrowlMessage("The company, user name or password is incorrect.", "error")); return; } //removed code for brevity }} where CreateGrowlMessage is public static GrowlMessage CreateGrowlMessage(string message, string severity) { GrowlMessage growlMessage = new GrowlMessage(); growlMessage.text = message; growlMessage.severity = severity; return growlMessage; } and GrowlMessage is public class GrowlMessage{ public string text; public string severity;} I was trying to extend both OAuthAuthorizationServerProvider and OAuthGrantResourceOwnerCredentialsContext shown bellow public class OAuthAuthorizationServerProviderExtended : OAuthAuthorizationServerProvider { public virtual Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContextExtended context) { return Task.FromResult<object>(null); } } public class OAuthGrantResourceOwnerCredentialsContextExtended : OAuthGrantResourceOwnerCredentialsContext { public OAuthGrantResourceOwnerCredentialsContextExtended(IOwinContext context, OAuthAuthorizationServerOptions options, string clientId, string userName, string password, IList<string> scope) : base(context, options, clientId, userName, password, scope) { } public IList<GrowlMessage> messages {get;set;} } but this is not having the desired effect. now all login attempts fail and all i get in the response is {"error":"invalid_grant"}
  2. Naming Custom Colors

    according to this page: http://caniuse.com/css-variables the use of css variables will be available on firefox when they lauch version 31 for other browsers it seems like there's no info about whem they'll support this functionality
  3. smtp credentials using live client for email from different domain

    Never mind, the problem was not with my configuration, that was correct... The problem was that the user hadn't fully configured the email accouint...
  4. I'm having trouble sending emails from an email like "mail@domain.com" wich is configured to use the live.mail.com client. Even though i think i'm using the right credentials i get the following error: "Mailbox unavailable. The server response was: 5.7.3 Requested action aborted; user not authenticated" this are my configurations: smtpClient = new SmtpClient("smtp.live.com");smtpClient.Port = 587;smtpClient.UseDefaultCredentials = false;smtpClient.Credentials = new System.Net.NetworkCredential("mail@domain.com", "Password");smtpClient.EnableSsl = true; any help is appreciated, for I can't seem to work-arround this problem and have to have this website online ASAP
  5. Animation-play-state?

    setting animation-fill-mode: forwards means that after the animation has completed execution i will hold at its final properties until the animation is removed. i guess i don't really understand what you are trying to acomplish.
  6. Positive critiques required

    I say there's space for a lot of improvement here, the page looks overwhelmed even though there isn't that much information, you should make use of more clear space. the backgrounds should be more smooth to give it a more appealing to the eye feeling. also a more readable frendly font would be good this just for starters take a look at the Web Design Concepts section of this page http://www.w3.org/community/webed/wiki/Main_Page#Web_Design_Concepts study it and try to improve your overall design.
  7. Animation-play-state?

    You'll need to use -webkit-animation-fill-mode -webkit-animation-fill-mode: forwards; leaves the animation in the last frame -webkit-animation-fill-mode: backwards; leaves the animation in the start frame
  8. hey, thanks for the reply justsomeguy! i already found the problem the MySql Connector installed in the production server was a very old version. It's solved.
  9. I'm trying to figure this out for a few day now, i have custom membership and role providers for my project and it works perfectly on my dev machine, but on production it throws the following error for the web.config I've read about people having simmilar issues because they hadn't named their connectionstrings but that's not the case here... any toughts on what's going on here? if you need any more info just ask and i'll provide. thanks for any help
  10. POST data according to a button

    one way to do that would be to use javascript to change the action property of your form before submiting
  11. I've already made my custom MemberShipProvider but now i would like to associate it with UserProfile using my specific fields. The problem is i can't find any good tutorial or article on how to do this...can anyone guide me in the right direction?by the way i'm a newbie to ASP.NET MVC3 and am using C#Edit: ok nevermind, i found what i was looking for.
  12. PHP Login System

    what thescientist said
  13. adding to a database (code not working)

    since UPDATE is a mysql reserved word you should use `update` when refering to the column mysql_query("UPDATE users SET `update` = `update` + 1 WHERE username = $show_username");
  14. PHP Login System

    no, you should not store any password on the session and if you want it only for admin you shoud have something to differentiate the admin from other users - a column isadmin(bit) set to 1 if the user is an administrator and to 0 if it's not.then when your user logs in you have to had that info to the session to.your $_SESSION["user"] would be something like $_SESSION["user"] = array("login"=>true,"username"=>"loged_user_name", "isadmin"=>true); when the user is an administrator, and then your code to show the edit link will be <?php...your code...if(isset($_SESSION["user"]["login"]) && $_SESSION["user"]["login"] == true && isset($_SESSION["user"]["isadmin"]) && $_SESSION["user"]["isadmin"] == true ){?> <a href="your_link">Edit</a><?php}...continue code...?>
  15. PHP Login System

    having $_SESSION["user"]["login"] whith default value being false when not logged-in then when a user logs-in you give this session var the value of true <?php...your code...if(isset($_SESSION["user"]["login"]) && $_SESSION["user"]["login"] == true){?> <a href="your_link">Edit</a><?php}...continue code...?>
×