/** * Retrieves an instance of a signature method that can be used to generate * or verify signatures for data. * * @return the retrieved signatured method. * @throws UnsupportedSignatureMethodException if signature method not supported. */ private static OAuthSignatureMethod getSignatureMethod(OAuthParameters params) throws UnsupportedSignatureMethodException { OAuthSignatureMethod method = Methods.getInstance(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 signatured method. * @throws UnsupportedSignatureMethodException if signature method not supported. */ private static OAuthSignatureMethod getSignatureMethod(OAuthParameters params) throws UnsupportedSignatureMethodException { OAuthSignatureMethod method = Methods.getInstance(params.getSignatureMethod()); if (method == null) { throw new UnsupportedSignatureMethodException(params.getSignatureMethod()); } return method; } }