Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

parameterize MS_LOGIN_URL#988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kimim wants to merge2 commits intoscribejava:master
base:master
Choose a base branch
Loading
fromkimim:master
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,6 +23,10 @@ protected MicrosoftAzureActiveDirectory20Api(String tenant) {
super(tenant);
}

protected MicrosoftAzureActiveDirectory20Api(String login_url, String tenant) {
super(login_url, tenant);
}

private static class InstanceHolder {

private static final MicrosoftAzureActiveDirectory20Api INSTANCE = new MicrosoftAzureActiveDirectory20Api();
Expand All@@ -36,6 +40,10 @@ public static MicrosoftAzureActiveDirectory20Api custom(String tenant) {
return new MicrosoftAzureActiveDirectory20Api(tenant);
}

public static MicrosoftAzureActiveDirectory20Api custom(String login_url, String tenant) {
return new MicrosoftAzureActiveDirectory20Api(login_url, tenant);
}

@Override
public BearerSignature getBearerSignature() {
return MicrosoftAzureActiveDirectory20BearerSignature.instance();
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,10 @@
public abstract class BaseMicrosoftAzureActiveDirectoryApi extends DefaultApi20 {

protected static final String COMMON_TENANT = "common";
protected static final String COMMON_LOGIN_URL = "https://login.microsoftonline.com/";

private static final String MSFT_LOGIN_URL = "https://login.microsoftonline.com/";
private static final String OAUTH_2 = "/oauth2";
private final String login_url;
private final String tenant;

protected BaseMicrosoftAzureActiveDirectoryApi() {
Expand All@@ -18,16 +19,22 @@ protected BaseMicrosoftAzureActiveDirectoryApi() {

protected BaseMicrosoftAzureActiveDirectoryApi(String tenant) {
this.tenant = tenant == null || tenant.isEmpty() ? COMMON_TENANT : tenant;
this.login_url = COMMON_LOGIN_URL;
}

protected BaseMicrosoftAzureActiveDirectoryApi(String login_url, String tenant) {
this(tenant);
this.login_url = login_url == null || login_url.isEmpty() ? COMMON_LOGIN_URL : login_url;
}

@Override
public String getAccessTokenEndpoint() {
returnMSFT_LOGIN_URL + tenant + OAUTH_2 + getEndpointVersionPath() + "/token";
returnlogin_url + tenant + OAUTH_2 + getEndpointVersionPath() + "/token";
}

@Override
protected String getAuthorizationBaseUrl() {
returnMSFT_LOGIN_URL + tenant + OAUTH_2 + getEndpointVersionPath() + "/authorize";
returnlogin_url + tenant + OAUTH_2 + getEndpointVersionPath() + "/authorize";
}

@Override
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp