Package com.azure.spring.aad
Class AADTrustedIssuerRepository
- java.lang.Object
-
- com.azure.spring.aad.AADTrustedIssuerRepository
-
- Direct Known Subclasses:
AADB2CTrustedIssuerRepository
public class AADTrustedIssuerRepository extends Object
A tenant id is used to construct the trusted issuer repository.
-
-
Constructor Summary
Constructors Constructor Description AADTrustedIssuerRepository(String tenantId)Creates a new instance ofAADTrustedIssuerRepository.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddB2CIssuer(String baseUri)Deprecated.deprecatedvoidaddB2CUserFlowIssuers(String baseUri, Map<String,String> userFlows)Deprecated.Is not recommended inAADTrustedIssuerRepositoryto add AAD B2C related content.booleanaddTrustedIssuer(String... issuers)Adds trusted issuers.booleanaddTrustedIssuer(String issuer, String oidcIssuerLocation)Adds a trusted issuer.StringgetSpecialOidcIssuerLocation(String issuer)Gets the issuer's special OIDC issuer location.Set<String>getTrustedIssuers()Gets the set of trusted issuers.booleanhasSpecialOidcIssuerLocation(String issuer)Whether the issuer has a special OIDC issuer location.booleanisTrusted(String issuer)Whether the issuer is trusted.protected StringresolveBaseUri(String baseUri)Resolve the base uri to get scheme and host.
-
-
-
Field Detail
-
tenantId
protected String tenantId
The tenant ID
-
-
Constructor Detail
-
AADTrustedIssuerRepository
public AADTrustedIssuerRepository(String tenantId)
Creates a new instance ofAADTrustedIssuerRepository.- Parameters:
tenantId- the tenant ID
-
-
Method Detail
-
getTrustedIssuers
public Set<String> getTrustedIssuers()
Gets the set of trusted issuers.- Returns:
- the set of trusted issuers
-
addTrustedIssuer
public boolean addTrustedIssuer(String... issuers)
Adds trusted issuers.- Parameters:
issuers- the issuers- Returns:
- whether the issuers were added
-
addTrustedIssuer
public boolean addTrustedIssuer(String issuer, String oidcIssuerLocation)
Adds a trusted issuer.- Parameters:
issuer- the issueroidcIssuerLocation- the OIDC issuer location- Returns:
- whether the issuer was added
-
isTrusted
public boolean isTrusted(String issuer)
Whether the issuer is trusted.- Parameters:
issuer- the issuer- Returns:
- whether the issuer is trusted
-
hasSpecialOidcIssuerLocation
public boolean hasSpecialOidcIssuerLocation(String issuer)
Whether the issuer has a special OIDC issuer location.- Parameters:
issuer- the issuer- Returns:
- whether the issuer has a special OIDC issuer location
-
getSpecialOidcIssuerLocation
public String getSpecialOidcIssuerLocation(String issuer)
Gets the issuer's special OIDC issuer location.- Parameters:
issuer- the issuer- Returns:
- the issuer's special OIDC issuer location
-
addB2CIssuer
@Deprecated public void addB2CIssuer(String baseUri)
Deprecated.deprecatedAdds a B2C issuer.- Parameters:
baseUri- the base URI
-
addB2CUserFlowIssuers
@Deprecated public void addB2CUserFlowIssuers(String baseUri, Map<String,String> userFlows)
Deprecated.Is not recommended inAADTrustedIssuerRepositoryto add AAD B2C related content. SeeAADB2CTrustedIssuerRepository.Only the V2 version of Access Token is supported when using Azure AD B2C user flows.- Parameters:
baseUri- The base uri is the domain part of the endpoint.userFlows- The all user flows mapping which is created under b2c tenant.
-
resolveBaseUri
protected String resolveBaseUri(String baseUri)
Resolve the base uri to get scheme and host.- Parameters:
baseUri- baseUri Base uri in the configuration file.- Returns:
- the parsed base uri.
- Throws:
RuntimeException- thrown if the uri is not valid.
-
-