Code Monkey home page Code Monkey logo

Comments (16)

Fristi avatar Fristi commented on June 14, 2024

+1

from signalr.

RaveNoX avatar RaveNoX commented on June 14, 2024

+1

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

Let's do this as a separate package.

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

Moving to next release.

from signalr.

tlnagy avatar tlnagy commented on June 14, 2024

Was this ever implemented? It would be extreme nice.

from signalr.

RaveNoX avatar RaveNoX commented on June 14, 2024

+1

from signalr.

mikehc avatar mikehc commented on June 14, 2024

Is there any way to accomplish this? Maybe to define a custom Authorization Manager like in WCF?

from signalr.

nicolaivs avatar nicolaivs commented on June 14, 2024

Sounds like an obvious feature to have added.

from signalr.

jlsfernandez avatar jlsfernandez commented on June 14, 2024

This feature means the possibility of:

From the HttpApplication.PostAutheticateRequest event handler get the Cookie of type FormsAuthentication

use FormsAuthenticationTicket.Decrypt method to get a Custom IPrincipal and use the custom information keeped on the Userdata information on the Hub dereived class?

i mean if now for my MVC controllers and my Webapi controllers i derived them from a class that can get my application information from my custom principal, iยดm going to be able to do the same?

Thanks

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

@jlsfernandez That's not right at all. Take a look at #548 for more context on this issue.

from signalr.

jlsfernandez avatar jlsfernandez commented on June 14, 2024

I saw thanks, meawhile if you know any URL where someone have play with an example of how to do it it will be helpful for me.

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

@jlsfernandez add the following to everything method you want authorized:

EnsureAuthented();

Definition:

private void EnsureAuthented()
{
    // Makes sure the user is logged in
    if (!Context.User.Identity.IsAuthenticated)
    {
        throw new InvalidOperationException("You're not authenticated");
    }
}

The assumption is that you authenticate outside of SignalR and you use the same authenticated user to perform actions on the Hub. For outgoingm handle IConnected and call the EnsureAuthenticated method in Connect and Reconnect.

from signalr.

amvjob avatar amvjob commented on June 14, 2024

+1 I need this too.

from signalr.

halter73 avatar halter73 commented on June 14, 2024

Fixed by 06ede37...996aff5

from signalr.

daanl avatar daanl commented on June 14, 2024

+1

from signalr.

Xiaohongt avatar Xiaohongt commented on June 14, 2024

verified

from signalr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.