How to Generate an Authentication Hash for the Oracle Field Service Cloud APIs

Java

import static java.lang.System.out;
import static java.time.format.DateTimeFormatter.ISO_INSTANT;
import static org.apache.commons.codec.digest.DigestUtils.sha256Hex;

import java.time.Instant;
import java.time.temporal.ChronoUnit.SECONDS;

public final class OfscSample {

  public static void main(final String[] args) {
    out.println(sha256Hex(ISO_INSTANT.format(Instant.now().truncatedTo(ChronoUnit.SECONDS)) + sha256Hex("password" + sha256Hex("login"))));
  }

}

Node.js

Python

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s