Skip to content

passbase/passbase-java

Repository files navigation

banner

passbase

Verification API

  • API version: 1.0.0

Introduction

Automatically generated by the Swagger Codegen

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.passbase</groupId>
  <artifactId>passbase</artifactId>
  <version>1.3.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.passbase:passbase:1.3.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/passbase-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.passbase.*;
import com.passbase.auth.*;
import com.passbase.model.*;
import com.passbase.api.IdentityApi;

import java.io.File;
import java.util.*;

public class IdentityApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: SecretApiKey
        ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
        SecretApiKey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //SecretApiKey.setApiKeyPrefix("Token");

        IdentityApi apiInstance = new IdentityApi();
        String id = "id_example"; // String | Identity id
        String resourceId = "resourceId_example"; // String | Resource id
        try {
            Resource result = apiInstance.getIdentityResourceById(id, resourceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IdentityApi#getIdentityResourceById");
            e.printStackTrace();
        }
    }
}
import com.passbase.*;
import com.passbase.auth.*;
import com.passbase.model.*;
import com.passbase.api.IdentityApi;

import java.io.File;
import java.util.*;

public class IdentityApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: SecretApiKey
        ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
        SecretApiKey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //SecretApiKey.setApiKeyPrefix("Token");

        IdentityApi apiInstance = new IdentityApi();
        java.util.UUID id = new java.util.UUID(); // java.util.UUID | Unique ID of the identity to return
        try {
            java.util.List<Identity> result = apiInstance.getIdentyById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IdentityApi#getIdentyById");
            e.printStackTrace();
        }
    }
}
import com.passbase.*;
import com.passbase.auth.*;
import com.passbase.model.*;
import com.passbase.api.IdentityApi;

import java.io.File;
import java.util.*;

public class IdentityApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: SecretApiKey
        ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
        SecretApiKey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //SecretApiKey.setApiKeyPrefix("Token");

        IdentityApi apiInstance = new IdentityApi();
        Integer limit = 56; // Integer |
        String cursor = "cursor_example"; // String |
        try {
            PaginatedIdentities result = apiInstance.listIdentities(limit, cursor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IdentityApi#listIdentities");
            e.printStackTrace();
        }
    }
}
import com.passbase.*;
import com.passbase.auth.*;
import com.passbase.model.*;
import com.passbase.api.IdentityApi;

import java.io.File;
import java.util.*;

public class IdentityApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: SecretApiKey
        ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
        SecretApiKey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //SecretApiKey.setApiKeyPrefix("Token");

        IdentityApi apiInstance = new IdentityApi();
        String id = "id_example"; // String | Identity id
        Integer limit = 56; // Integer |
        String cursor = "cursor_example"; // String |
        try {
            PaginatedResources result = apiInstance.listIdentityResources(id, limit, cursor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IdentityApi#listIdentityResources");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.passbase.com/verification/v1

Class Method HTTP request Description
IdentityApi getIdentityResourceById GET /identities/{id}/resource/{resource_id} Get resource
IdentityApi getIdentyById GET /identities/{id} Get identity
IdentityApi listIdentities GET /identities List identities
IdentityApi listIdentityResources GET /identities/{id}/resources List resources
ProjectApi getSettings GET /settings Get project settings

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

IdentityAccessToken

PublishableApiKey

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header

SecretApiKey

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author