Docs
  • National Logistics Ecosystem
  • Getting Started
    • introduction
    • Login with LOGPASS
      • Overview
      • Business Flow
      • Plugin
      • Glossary
    • Versioning
    • Contact Developer
  • API's
    • Customs API
      • Overview
      • List Document
        • NO BL By NPWP
        • Dok PPFTZ
        • BC20 By NOBL
        • BC20 By NOPIB
        • BC16 By NPWP
        • BC20 By NPWP
        • BC23 By NPWP
      • List Container
        • Kontainer SP3B
        • Kontainer BC 16
        • Kontainer BC 20
        • Kontainer BC 23
        • Kontainer BC 27
        • Kontainer BC 28
        • Kontainer BC 30
        • Kontainer BC 25
        • Kontainer BC 261
        • Kontainer BC 262
        • Kontainer PPFTZ
    • DO Online
      • Version 1.0
      • DO Final Version
      • OAuth Version
        • API GET Active DO By BL House
        • API GET Active DO
        • API PUT Update DO Paid Date
        • API PUT Update Price
        • API PUT Update Status DO
        • API GET Document DO List By BL
        • API GET Document DO By BL
        • API GET Document DO By NPWP
        • API Post Document DO
    • SP2 Online
      • Platform
        • Cargo Owner
        • Host-to-host
      • Version 1.0
      • SP2 Final Version
      • OAuth Version
        • Overview
        • API
        • Reference
    • Trucking
      • Open Bidding
        • Overview
        • API 01
        • API 02
        • API 04
        • API 05
        • API 06
        • API 09
        • API 10
        • API 11
      • OAuth Version
        • Overview
        • API 01
        • API 02
        • API 06
        • API 09
        • API 10
        • API 11
    • Vessel Domestic
      • OAuth Version
        • API
    • Warehouse
      • OAuth Version
        • API
  • User Guide
    • Inbound
    • Outbound
    • Domestic
      • Vessel
    • Free Trade Zone (BLE)
      • LAYANAN STS/ FSU
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. Login with LOGPASS

Plugin

Dalam hal kemudahan platform melakukan implementasi framework oauth NLE, disediakan plugin javascript yang dapat digunakan untuk mengakses pop up window halaman login NLE serta menerima data user keti

Kompabilitas Plugin javascript ini telah melalui ujicoba kompabilitas di beberapa browser mencakup:

  • Google Chrome Version >= 1

  • Microsoft Edge Version >= 12

  • Mozilla Firefox Version >= 6

  • Opera Version >= 9.5

  • Safari Version >= 4

  • Android Webview Version >= 1

  • Chrome For Android Version >= 18

  • Mozilla Firefox For Android Version >= 6

  • Opera For Android Version >= 10.1

  • Safari On IOS Version >= 3.2

  • Samsung Internet Version >= 1.0

Resource

<script type="text/javascript" src="https://nle.kemenkeu.go.id/seamlesslogin/nlelogin.min.js"></script>

Configurations

var loginAsNLE = new NLEAuth({
   token: 'db8f1a2be32183ff9e741a5e4b55db32bf0b',
   redirect: true,
   redirect_page: 'https:// logjay.com/login_success.html',
   onsuccess: function(data) {
      this.setCookie('nle_token', data.access_token, data.expires_in);
      this.setCookie('nle_user', data.username, data.expires_in);
      document.location = 'https://logjay.com/login_success.html';
  }
});

Configuration Options

Option

Type

Default

Description

token

string

null

Kode akses halaman login yang didapat dari API Generate Token For Login Page. Perlu diingat, kode akses halaman login hanya aktif selama 1 jam dari waktu pertama kali dibuat.

redirect

booelan

false

Jika true, setelah login sukses pengguna akan diarahkan ke halaman tertentu yang didefinisikan pada option redirect_page.

Selain itu, jika bernilai true maka plugin akan secara otomatis menyimpan data user kedalam cookie aplikasi Web platform yang mencakup:

redirect_page

string

null

Halaman yang dituju ketika login sukses. Membutuhkan konfigurasi redirect bernilai true.

onsuccess

function

null

Javascript function yang akan dijalankan ketika login sukses. Dengan konfigurasi ini, platform dapat mengolah sendiri data user hasil login serta aktifitas yang terjadi setelahnya, seperti redirect ke halaman tertentu.

Catatan

Konfigurasi redirect = true tidak akan dijalankan jika penanganan event onsuccess telah ditetapkan.

Method

Method

Description

openFormLogin()

Berfungsi untuk membuka Popup Window form login user NLE.

setCookie(<String> cookie_name, <String> cookie_value, <Seconds> expires_in)

Berfungsi untuk menyimpan data ke cookie web browser.

getAccessToken()

Berfungsi untuk mendapatkan kode access_token hasil login user NLE.

PreviousBusiness FlowNextGlossary

Last updated 4 years ago

Was this helpful?