/** * Retrieves an instance of a signature method that can be used to generate * or verify signatures for data. * * @return the retrieved signature method. * @throws UnsupportedSignatureMethodException if signature method not supported. */ private OAuth1SignatureMethod getSignatureMethod(final OAuth1Parameters params) throws UnsupportedSignatureMethodException { final OAuth1SignatureMethod method = methods.get(params.getSignatureMethod()); if (method == null) { throw new UnsupportedSignatureMethodException(params.getSignatureMethod()); } return method; }
private void checkParametersConsistency(OAuth1Parameters oauth1Parameters, OAuth1Secrets oauth1Secrets) { if (oauth1Parameters.getSignatureMethod() == null) { oauth1Parameters.signatureMethod("HMAC-SHA1"); } if (oauth1Parameters.getVersion() == null) { oauth1Parameters.version(); } if (oauth1Secrets.getConsumerSecret() == null || oauth1Parameters.getConsumerKey() == null) { throw new ProcessingException(LocalizationMessages.ERROR_CONFIGURATION_MISSING_CONSUMER()); } if (oauth1Parameters.getToken() != null && oauth1Secrets.getTokenSecret() == null) { throw new ProcessingException(LocalizationMessages.ERROR_CONFIGURATION_MISSING_TOKEN_SECRET()); } } }
/** * Retrieves an instance of a signature method that can be used to generate * or verify signatures for data. * * @return the retrieved signature method. * @throws UnsupportedSignatureMethodException if signature method not supported. */ private OAuth1SignatureMethod getSignatureMethod(final OAuth1Parameters params) throws UnsupportedSignatureMethodException { final OAuth1SignatureMethod method = methods.get(params.getSignatureMethod()); if (method == null) { throw new UnsupportedSignatureMethodException(params.getSignatureMethod()); } return method; }
/** * Retrieves an instance of a signature method that can be used to generate * or verify signatures for data. * * @return the retrieved signature method. * @throws UnsupportedSignatureMethodException if signature method not supported. */ private OAuth1SignatureMethod getSignatureMethod(final OAuth1Parameters params) throws UnsupportedSignatureMethodException { final OAuth1SignatureMethod method = methods.get(params.getSignatureMethod()); if (method == null) { throw new UnsupportedSignatureMethodException(params.getSignatureMethod()); } return method; }
private void checkParametersConsistency(OAuth1Parameters oauth1Parameters, OAuth1Secrets oauth1Secrets) { if (oauth1Parameters.getSignatureMethod() == null) { oauth1Parameters.signatureMethod("HMAC-SHA1"); } if (oauth1Parameters.getVersion() == null) { oauth1Parameters.version(); } if (oauth1Secrets.getConsumerSecret() == null || oauth1Parameters.getConsumerKey() == null) { throw new ProcessingException(LocalizationMessages.ERROR_CONFIGURATION_MISSING_CONSUMER()); } if (oauth1Parameters.getToken() != null && oauth1Secrets.getTokenSecret() == null) { throw new ProcessingException(LocalizationMessages.ERROR_CONFIGURATION_MISSING_TOKEN_SECRET()); } } }
private void checkParametersConsistency(OAuth1Parameters oauth1Parameters, OAuth1Secrets oauth1Secrets) { if (oauth1Parameters.getSignatureMethod() == null) { oauth1Parameters.signatureMethod("HMAC-SHA1"); } if (oauth1Parameters.getVersion() == null) { oauth1Parameters.version(); } if (oauth1Secrets.getConsumerSecret() == null || oauth1Parameters.getConsumerKey() == null) { throw new ProcessingException(LocalizationMessages.ERROR_CONFIGURATION_MISSING_CONSUMER()); } if (oauth1Parameters.getToken() != null && oauth1Secrets.getTokenSecret() == null) { throw new ProcessingException(LocalizationMessages.ERROR_CONFIGURATION_MISSING_TOKEN_SECRET()); } } }
private void checkParametersConsistency(OAuth1Parameters oauth1Parameters, OAuth1Secrets oauth1Secrets) { if (oauth1Parameters.getSignatureMethod() == null) { oauth1Parameters.signatureMethod("HMAC-SHA1"); } if (oauth1Parameters.getVersion() == null) { oauth1Parameters.version(); } if (oauth1Secrets.getConsumerSecret() == null || oauth1Parameters.getConsumerKey() == null) { throw new ProcessingException(LocalizationMessages.ERROR_CONFIGURATION_MISSING_CONSUMER()); } if (oauth1Parameters.getToken() != null && oauth1Secrets.getTokenSecret() == null) { throw new ProcessingException(LocalizationMessages.ERROR_CONFIGURATION_MISSING_TOKEN_SECRET()); } } }