OAuth1 with RSA-SHA1

Good afternoon.

I’m currently trying to integrate with a service that uses OAuth 1. I’ve followed the instructions on this page https://www.playframework.com/documentation/2.7.x/ScalaOAuth and managed to get it working. My only problem is that it defaults to using HMAC-SHA1 signature and I need it to use RSA-SHA1. Is there a way to configure it?

Thanks in advanced.

Hey @jordimasip,

So, at the end of that page, you can see the following sample:

def timeline = Action.async { implicit request: Request[AnyContent] =>
  sessionTokenPair match {
    case Some(credentials) => {
        .sign(OAuthCalculator(KEY, credentials))
        .map(result => Ok(result.json))
    case _ => Future.successful(Redirect(routes.Application.authenticate))

See the line with sign(OAuthCalculator(KEY, credentials)) there? You can provide your own implementation instead of using OAuthCalculator.