mirror of
https://github.com/OpenBankProject/API-Explorer.git
synced 2026-02-06 10:47:23 +00:00
feature/Set HMAC-SHA256 as default OAuth1 algorithm
This commit is contained in:
parent
36196e6cf6
commit
602adac804
2
pom.xml
2
pom.xml
@ -146,7 +146,7 @@
|
||||
<dependency>
|
||||
<groupId>oauth.signpost</groupId>
|
||||
<artifactId>signpost-commonshttp4</artifactId>
|
||||
<version>1.2.1.2</version>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.OpenBankProject</groupId>
|
||||
|
||||
@ -32,25 +32,14 @@ Berlin 13359, Germany
|
||||
|
||||
package code.lib
|
||||
|
||||
import code.lib.ObpAPI.obpPrefix
|
||||
import code.util.Helper
|
||||
import net.liftweb.http.SessionVar
|
||||
import net.liftweb.common.Box
|
||||
import net.liftweb.common.Empty
|
||||
import oauth.signpost.OAuthProvider
|
||||
import oauth.signpost.basic.DefaultOAuthProvider
|
||||
import net.liftweb.http.S
|
||||
import oauth.signpost.OAuthConsumer
|
||||
import oauth.signpost.basic.DefaultOAuthConsumer
|
||||
import net.liftweb.mapper.By
|
||||
import net.liftweb.common.{Failure, Full}
|
||||
import net.liftweb.http.LiftResponse
|
||||
import code.util.Helper.MdcLoggable
|
||||
import net.liftweb.util.Helpers
|
||||
import net.liftweb.common.{Box, Empty, Failure, Full}
|
||||
import net.liftweb.http.{LiftResponse, S, SessionVar}
|
||||
import net.liftweb.util.Helpers.tryo
|
||||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.Future
|
||||
import oauth.signpost.basic.{DefaultOAuthConsumer, DefaultOAuthProvider}
|
||||
import oauth.signpost.signature.HmacSha256MessageSigner
|
||||
import oauth.signpost.{OAuthConsumer, OAuthProvider}
|
||||
|
||||
sealed trait Provider {
|
||||
val name : String
|
||||
@ -197,6 +186,7 @@ object OAuthClient extends MdcLoggable {
|
||||
logger.debug("redirect says: credential.consumer.getToken: " + credential.consumer.getToken)
|
||||
logger.debug("redirect says: credential.provider: " + credential.provider)
|
||||
logger.debug("redirect says: oauthcallbackUrl: " + oauthcallbackUrl)
|
||||
credential.consumer.setMessageSigner(new HmacSha256MessageSigner())
|
||||
val authUrl = provider.oAuthProvider.retrieveRequestToken(credential.consumer, oauthcallbackUrl)
|
||||
logger.debug("redirect says: authUrl: " + authUrl)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user