/** * Checks whether the given consumer is valid or not. This is done by validating the signature, * signed by this particular consumer. * * @param oauthConsumer Parameter related to the OAuth authorization header. * @return * @throws Exception */ public boolean isOAuthConsumerValid(OAuthConsumerDTO oauthConsumer) throws IdentityException { String oAuthSecretKey = getOAuthSecretKey(oauthConsumer.getOauthConsumerKey()); if (oAuthSecretKey == null) { log.debug("Invalid Consumer Key."); throw IdentityException.error("Invalid Consumer Key"); } try { return validateOauthSignature(oauthConsumer, oAuthSecretKey); } catch (AuthenticationException e) { throw IdentityException.error(e.getMessage(), e); } }
/** * Checks whether the given consumer is valid or not. This is done by validating the signature, * signed by this particular consumer. * * @param oauthConsumer Parameter related to the OAuth authorization header. * @return * @throws Exception */ public boolean isOAuthConsumerValid(OAuthConsumerDTO oauthConsumer) throws IdentityException { String oAuthSecretKey = getOAuthSecretKey(oauthConsumer.getOauthConsumerKey()); if (oAuthSecretKey == null) { log.debug("Invalid Consumer Key."); throw IdentityException.error("Invalid Consumer Key"); } try { return validateOauthSignature(oauthConsumer, oAuthSecretKey); } catch (AuthenticationException e) { throw IdentityException.error(e.getMessage(), e); } }
oauthParameters.setOAuthConsumerKey(oauthParams.getOauthConsumerKey()); oauthParameters.setOAuthConsumerSecret(secretKey); oauthParameters.setOAuthNonce(oauthParams.getOauthNonce());
oauthParameters.setOAuthConsumerKey(oauthParams.getOauthConsumerKey()); oauthParameters.setOAuthConsumerSecret(secretKey); oauthParameters.setOAuthNonce(oauthParams.getOauthNonce());