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

com.github.scribejava.apis.HiOrgServerApi20 Maven / Gradle / Ivy

There is a newer version: 8.3.3
Show newest version
package com.github.scribejava.apis;

import com.github.scribejava.core.builder.api.DefaultApi20;

/**
 * OAuth2 API for HiOrg-Server
 *
 * @see HiOrg-Server OAuth API documentation
 */
public class HiOrgServerApi20 extends DefaultApi20 {

    private final String version;

    protected HiOrgServerApi20() {
        this("v1");
    }

    protected HiOrgServerApi20(String version) {
        this.version = version;
    }

    private static class InstanceHolder {

        private static final HiOrgServerApi20 INSTANCE = new HiOrgServerApi20();
    }

    public static HiOrgServerApi20 instance() {
        return InstanceHolder.INSTANCE;
    }

    public static HiOrgServerApi20 customVersion(String version) {
        return new HiOrgServerApi20(version);
    }

    @Override
    public String getAccessTokenEndpoint() {
        return "https://www.hiorg-server.de/api/oauth2/" + version + "/token.php";
    }

    @Override
    protected String getAuthorizationBaseUrl() {
        return "https://www.hiorg-server.de/api/oauth2/" + version + "/authorize.php";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy