I have been considering this for some time.
<br>

<br>
I think there should be a new auth_jwt module, probably based on auth_ephemeral (which is similar in concept).  For SIP over WebSockets this can then be used to authenticate the client during the WebSocket handshake.
<br>

<br>
There should be a “Private Claim Name” defined to contain the identity of the calling/registering party.  This can be cached during the WebSocket handshake and then used to valid the To-URI (REGISTER/PUBLISH) and From-URI (other requests without To-tags).  The “Expiration Time Claim” should be cached too.
<br>

<br>
auth_jwt should contain helper functions for checking URIs and whether the token is still valid - similar to those in auth_ephemeral.
<br>

<br>
Regards,
<br>

<br>
Peter
<br>

<br>
— 
<br>
Peter Dunkley
<br>
http://www.dunkley.me.uk/ <http://www.dunkley.me.uk/>
<br>
http://www.linkedin.com/in/pdunkley <http://www.linkedin.com/in/pdunkley>
<br>
> On 13 Jan 2015, at 20:59, kamailio-sync <notifications@github.com> wrote:
<br>

<br>

<br>
> On 12 Jan 2015, at 21:34, mading087 <notifications@github.com> wrote: 
<br>

<br>
> > It seems a good idea to support JWT as a new SIP authorization method. Wonder if anyone is interested? Think auth_db would be the best spot to add support for JWT. 
<br>
> > 
<br>
> Please check the work that is ongoing with OAuth - there is an IETF draft on that. 
<br>

<br>
> /O
<br>
> —
<br>
> Reply to this email directly or view it on GitHub <https://github.com/kamailio/kamailio/issues/29#issuecomment-69818698>.
<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/29#issuecomment-69819723">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZTsECHcysmP3RB5bbRVcDA3Sur5nks5nhYAhgaJpZM4DRWgb.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/29#issuecomment-69819723"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>