Sha256: ed26d32ca720a03fdb03fef1d664038f30a2741541e9fc7ac3a0de1cd850b3ab

Contents?: true

Size: 906 Bytes

Versions: 1

Compression:

Stored size: 906 Bytes

Contents

<h3>升级授权</h3>

<p>
  <%= link_to '获取令牌', fetch_token_path,format: 'json', remote: true %>
  <span> PS: 注意获取令牌一天最多20次,有效期仅5分钟</span>
</p>

<div class="">
  <%= form_tag web_sandbox_console.auth_path, method: :post do %>
    <table>
      <tr>
        <td>加密密文</td>
        <td>
          <%= text_area_tag :secret_text, '', style: "width: 300px;height: 100px;" %>
        </td>
        <td><%= submit_tag '提交', data: { disable_with: "已发送,处理中..." }, class: 'view-file-button' %></td>
    </table>
  <% end %>
</div>

<h4>说明令牌使用说明:</h4>
<div>
  <pre>
    require 'openssl'
    require 'base64'

    private_key = "你的私钥"
    p_key = OpenSSL::PKey::RSA.new private_key
    secret_text = p_key.private_encrypt("你的令牌")
    encode_text = Base64.encode64(secret_text)
    puts encode_text
  </pre>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
web_sandbox_console-0.4.0 app/views/web_sandbox_console/authorization/auth_page.html.erb