Java Script getSpParamOfWeiboLogin(String pwd, String servicetime, String nonce)

Here you can find the source of getSpParamOfWeiboLogin(String pwd, String servicetime, String nonce)

Description

get Sp Param Of Weibo Login

License

Apache License

Declaration

public static String getSpParamOfWeiboLogin(String pwd, String servicetime, String nonce) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import javax.script.Invocable;
import javax.script.ScriptEngine;

public class Main {
    private static ScriptEngine se = null;
    private static String rsaPubkey = "EB2A38568661887FA180BDDB5CABD5F21C7BFD59C090CB2D245A87AC253062882729293E5506350508E7F9AA3BB77F4333231490F915F6D63C55FE2F08A49B353F444AD3993CACC02DB784ABBB8E42A9B1BBFFFB38BE18D78E87A0E41B9B8F73A928EE0CCEE1F6739884B9777E4FE9E88A1BBE495927AC4A799B3181D6442443";

    public static String getSpParamOfWeiboLogin(String pwd, String servicetime, String nonce) {
        return getSpParamOfWeiboLogin(pwd, servicetime, nonce, rsaPubkey);
    }/*from  ww  w  . jav a  2 s. c  o  m*/

    public static String getSpParamOfWeiboLogin(String pwd, String servicetime, String nonce, String pubkey) {
        if (pubkey == null || "".equals(pubkey)) {
            pubkey = rsaPubkey;
        }
        String sp = null;
        try {
            if (se instanceof Invocable) {
                Invocable invoke = (Invocable) se;
                sp = invoke.invokeFunction("getpass", pwd, servicetime, nonce, pubkey).toString();//
                System.out.println("param sp: " + sp);
            }
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
        return sp;
    }
}

Related

  1. generateToken(String val)
  2. getBallerinaFromJsonModel(String jsonModel)
  3. getDynamicInput(String key)
  4. getScript(String name)
  5. getScriptCompileMsg(ScriptException ex)
  6. removeScript(String name)
  7. runScript(final String script)
  8. toMap(ScriptObjectMirror som, Class type)
  9. toSci(BigDecimal bd, int sf)