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

org.springframework.social.partnercenter.api.uri.SecurityRegion Maven / Gradle / Ivy

Go to download

A provider extension for Spring Social to enable connectivity with Microsoft and an API binding for Microsoft's Partner Center API.

There is a newer version: 10.11.0
Show newest version
package org.springframework.social.partnercenter.api.uri;

import java.util.Optional;
import java.util.stream.Stream;

public enum SecurityRegion {
	USA("https://login.windows.net", "https://graph.windows.net", "https://api.partnercenter.microsoft.com"),
	DEU("https://login.microsoftonline.de", "https://graph.cloudapi.de", "https://api.partnercenter.microsoft.com");

	private String authority;
	private String resourceUrl;
	private String partnerServiceApiRoot;

	SecurityRegion(String authority, String resourceUrl, String partnerServiceApiRoot) {
		this.authority = authority;
		this.resourceUrl = resourceUrl;
		this.partnerServiceApiRoot = partnerServiceApiRoot;
	}

	public String getAuthority() {
		return authority;
	}

	public String getResourceUrl() {
		return resourceUrl;
	}

	public String getPartnerServiceApiRoot() {
		return partnerServiceApiRoot;
	}

	public static Optional forAuthority(String authority) {
		return Stream.of(values())
				.filter(region -> authority.equalsIgnoreCase(region.getAuthority()))
				.findFirst();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy