Jump to content

Obi1-Cannabis

Members
  • Posts

    146
  • Joined

  • Last visited

Posts posted by Obi1-Cannabis

  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. 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

     

  3. 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.

  4. 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.

  5. 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

  6. 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

     

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Exception has been thrown by the target of an invocation.

    Source Error:

    Line 24: <providers>Line 25: <clear />Line 26: <add name="FeelSafeRoleProvider" type="FeelSafe.Helpers.FeelSafeRoleProvider, FeelSafe" connectionStringName="FeelSafeEntities" />Line 27: </providers>Line 28: </roleManager>

    Source File: (...)web.config Line: 26

     

     

    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

  7. if i got you right what you have to do is something like:

    var mouseListener:Object = new Object();mouseListener.onMouseMove = function(){ if(x_mouse > 0){  this.currentFrame += 1; } if(x_mouse < 0){  this.currentFrame -= 1; }}

    i'm not sure, because i didn't had the time to try. just saying from the top of my head.but it can't be much diffrent.

  8. why don't you try searching on google for: using webcam with flash. i found some interesting stuff about movement detection, i don't think that's what your looking for, but it may be of some help.

  9. Is it possible to pass a php variable into a js variable without the use of post get or ajax?i thought maybe something like:

    <? print"<script language=JavaScript>";print"var jsVar= '".$phpVar."';";print"</script>";?>

    I think it actually does work, but it keeps giving me errors that don't have anything to do with this variable but that don't appear when i'm not using that variable... :)

  10. I would like to know how to make those things that look like some kind of popups used for example in microsoft's site when you choose something from that right side menu.it disables everithing that's behind.I know it has the use of ajax for sure, but don't know how...if someone knows or have any idea i would apreciate!!Big UP!

  11. i wasn't really thinking about using some good machine, maybe my old one (amd 1.3, 512Mb ram), isn't it ok?anyway I guess i'll pay for a host for now, and maybe later i will have my own server...

  12. yes that's what i meant, i should have known english didn't have that expression.thanks, it works just as i thought.do you think it might be a good idea if i have my own server/host, since i will want to have at least a few sites?

  13. Hi,I want to put a site on air, but i've never done it before so what i want to now is what do i need to do.Do i simply buy a domain and a host?How do i associate that domain name with that site in that host?if later i wish to put some new site(s) i obviously need to buy new domain(s), but what about hosts do i need to also buy 1 for each site or one can hold multiple sites and multiple domains? (if so, how is it donne?)big up!

  14. HeyBack with another problem :) flash+xml+php+mysql, but the problem is only between flash and the xml created by the php... flash accesses the php, it does what it is suposed to do, that is checks if the information is on the DB if it's not inserts it and creates xml code saying "inserted" if it's already there creates that code but sayin "already there", untill here everything is fine but the flash is not getting those answers back...

    function responde() {  resposta=respostaXML.firstChild.childNodes[0].nodeValue;  trace("it's here");  _parent.resp.text = resposta;}		respostaXML = new XML;respostaXML.ignoreWhite = true;respostaXML.onLoad = responde;respostaXML.load("http://cgseguros/newsletter.php?&nome="+_parent.your_name+"&mail="+_parent.your_email);

    ...in fact it doesn't even enter the function(it's not displaying that 'trace' nor giving the value to '_parent.resp.text.can this be because the file is php but is displaying xml?EDIT:No that can't be the problem i've used it before... :)

×
×
  • Create New...