All Downloads are FREE. Search and download functionalities are using the official Maven repository.

one.credify.sdk.AuthService Maven / Gradle / Ivy

There is a newer version: v0.4.9
Show newest version
package one.credify.sdk;

import one.credify.sdk.dto.IntrospectTokenData;
import one.credify.sdk.dto.OidcOptions;
import one.credify.sdk.dto.OidcResponse;

import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.security.spec.InvalidKeySpecException;
import java.util.Map;

public interface AuthService {
    String generateAccessToken(String apiKey) throws IOException;

    /**
     * This function validates an access token passed from Credify. You need to pass the token and a specific scope to test its validity.
     * @param token
     * @param scope
     * @return
     * @throws IOException
     */
    boolean introspectToken(String token, String scope) throws IOException;

    /**
     * This same with introspectToken function but without passing specific scope, it will not test and validate the scope.
     * @param token
     * @return
     * @throws IOException
     */
    IntrospectTokenData introspectTokenReturnResult(String token) throws IOException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy