Hi All,

I am using signed jwt authentication in my jaggery app which is hosted in
WSO2 Application Server. I built the authenticator at [1] and added it to
the AS_HOME/repository/components/dropins folder. The signed jwt
authenticator has been added as a local authenticator.

AFAIU we can use the isHandle and isAuthenticated methods to authenticate a
user. The logic to include in the jaggery code would be as follows.

*var SignedJWTAuthenticator =
Packages.org.wso2.carbon.identity.authenticator.signedjwt.SignedJWTAuthenticator;*
*var signedJWTAuthenticator = new SignedJWTAuthenticator();*

*if (signedJWTAuthenticator.isHandle(msgContext)) {*
* if (signedJWTAuthenticator.isAuthenticated(msgContext)) {*
* // Perform logic here*
* }*
*}*

Note that we need to pass the message context to both methods based on [2]
and [3].

Based on [4] the HTTP request should be included in a message context,
which would require creating a separate request object on the server side
using the requests params/getting the request object from the jaggery app.

Any other alternatives to create a MessageContext using a http request?

Any examples for the usage of signed jwt authenticator in a jaggery
application for authentication would also be helpful.

Thanks in advance.

[1]
https://github.com/wso2/carbon-identity/tree/master/components/carbon-authenticators/signedjwt-authenticator
[2]
https://github.com/wso2/carbon-identity/blob/master/components/carbon-authenticators/signedjwt-authenticator/org.wso2.carbon.identity.authenticator.signedjwt/src/main/java/org/wso2/carbon/identity/authenticator/signedjwt/SignedJWTAuthenticator.java#L149
[3]
https://github.com/wso2/carbon-identity/blob/master/components/carbon-authenticators/signedjwt-authenticator/org.wso2.carbon.identity.authenticator.signedjwt/src/main/java/org/wso2/carbon/identity/authenticator/signedjwt/SignedJWTAuthenticator.java#L87
[4]
https://github.com/wso2/carbon-identity/blob/master/components/carbon-authenticators/signedjwt-authenticator/org.wso2.carbon.identity.authenticator.signedjwt/src/main/java/org/wso2/carbon/identity/authenticator/signedjwt/SignedJWTAuthenticator.java#L150

Regards.
Sabra.

-- 
*Sabra Ossen*
*Software Engineer*
Email: [email protected]
Mobile: +94 767 837356

<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to