Package com.microsoft.jenkins.azuread
Class AzureSecurityRealm
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<SecurityRealm>
-
- hudson.security.SecurityRealm
-
- com.microsoft.jenkins.azuread.AzureSecurityRealm
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<SecurityRealm>
public class AzureSecurityRealm extends SecurityRealm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AzureSecurityRealm.ConverterImpl
static class
AzureSecurityRealm.CrumbExempt
static class
AzureSecurityRealm.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.security.SecurityRealm
SecurityRealm.SecurityComponents
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static String
CALLBACK_URL
static String
CONVERTER_DISABLE_GRAPH_INTEGRATION
static String
CONVERTER_ENVIRONMENT_NAME
static String
CONVERTER_SINGLE_LOGOUT
-
Fields inherited from class hudson.security.SecurityRealm
AUTHENTICATED_AUTHORITY, AUTHENTICATED_AUTHORITY2, LIST, NO_AUTHENTICATION
-
-
Constructor Summary
Constructors Constructor Description AzureSecurityRealm()
AzureSecurityRealm(String tenant, String clientId, Secret clientSecret, int cacheDuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowsSignup()
SecurityRealm.SecurityComponents
createSecurityComponents()
org.kohsuke.stapler.HttpResponse
doCommenceLogin(org.kohsuke.stapler.StaplerRequest request, String referer)
org.kohsuke.stapler.HttpResponse
doFinishLogin(org.kohsuke.stapler.StaplerRequest request)
com.azure.core.credential.AccessToken
getAccessToken()
String
getAzureEnvironmentName()
int
getCacheDuration()
String
getClientId()
String
getClientIdSecret()
Secret
getClientSecret()
String
getClientSecretSecret()
org.jose4j.jwt.consumer.JwtConsumer
getJwtConsumer()
String
getLoginUrl()
protected String
getPostLogOutUrl2(org.kohsuke.stapler.StaplerRequest req, org.springframework.security.core.Authentication auth)
String
getTenant()
String
getTenantSecret()
boolean
isDisableGraphIntegration()
boolean
isFromRequest()
boolean
isSingleLogout()
GroupDetails
loadGroupByGroupname2(String groupName, boolean fetchMembers)
void
setAzureEnvironmentName(String azureEnvironmentName)
void
setCacheDuration(int cacheDuration)
void
setCaches(com.github.benmanes.caffeine.cache.Cache<String,AzureAdUser> caches)
void
setClientId(String clientId)
void
setClientSecret(String clientSecret)
void
setDisableGraphIntegration(boolean disableGraphIntegration)
void
setFromRequest(boolean fromRequest)
void
setSingleLogout(boolean singleLogout)
void
setTenant(String tenant)
-
Methods inherited from class hudson.security.SecurityRealm
all, canLogOut, commenceSignup, commonFilters, createCliAuthenticator, createFilter, doCaptcha, doLogout, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getFrom, getGroupIdStrategy, getPostLogOutUrl, getSecurityComponents, getUserIdStrategy, loadGroupByGroupname, loadGroupByGroupname, loadUserByUsername, loadUserByUsername2, setCaptchaSupport, validateCaptcha
-
-
-
-
Field Detail
-
CALLBACK_URL
public static final String CALLBACK_URL
- See Also:
- Constant Field Values
-
CONVERTER_DISABLE_GRAPH_INTEGRATION
public static final String CONVERTER_DISABLE_GRAPH_INTEGRATION
- See Also:
- Constant Field Values
-
CONVERTER_SINGLE_LOGOUT
public static final String CONVERTER_SINGLE_LOGOUT
- See Also:
- Constant Field Values
-
CONVERTER_ENVIRONMENT_NAME
public static final String CONVERTER_ENVIRONMENT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAccessToken
public com.azure.core.credential.AccessToken getAccessToken()
-
isSingleLogout
public boolean isSingleLogout()
-
setSingleLogout
@DataBoundSetter public void setSingleLogout(boolean singleLogout)
-
getClientIdSecret
public String getClientIdSecret()
-
getClientSecretSecret
public String getClientSecretSecret()
-
getTenantSecret
public String getTenantSecret()
-
getClientId
public String getClientId()
-
getAzureEnvironmentName
public String getAzureEnvironmentName()
-
setAzureEnvironmentName
@DataBoundSetter public void setAzureEnvironmentName(String azureEnvironmentName)
-
isDisableGraphIntegration
public boolean isDisableGraphIntegration()
-
setDisableGraphIntegration
@DataBoundSetter public void setDisableGraphIntegration(boolean disableGraphIntegration)
-
setClientId
public void setClientId(String clientId)
-
getClientSecret
public Secret getClientSecret()
-
setClientSecret
public void setClientSecret(String clientSecret)
-
getTenant
public String getTenant()
-
setTenant
public void setTenant(String tenant)
-
getCacheDuration
public int getCacheDuration()
-
setCacheDuration
public void setCacheDuration(int cacheDuration)
-
setCaches
public void setCaches(com.github.benmanes.caffeine.cache.Cache<String,AzureAdUser> caches)
-
isFromRequest
public boolean isFromRequest()
-
setFromRequest
@DataBoundSetter public void setFromRequest(boolean fromRequest)
-
getJwtConsumer
public org.jose4j.jwt.consumer.JwtConsumer getJwtConsumer()
-
doCommenceLogin
public org.kohsuke.stapler.HttpResponse doCommenceLogin(org.kohsuke.stapler.StaplerRequest request, @Header("Referer") String referer)
-
doFinishLogin
public org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest request) throws org.jose4j.jwt.consumer.InvalidJwtException, IOException
- Throws:
org.jose4j.jwt.consumer.InvalidJwtException
IOException
-
getPostLogOutUrl2
protected String getPostLogOutUrl2(org.kohsuke.stapler.StaplerRequest req, org.springframework.security.core.Authentication auth)
- Overrides:
getPostLogOutUrl2
in classSecurityRealm
-
createSecurityComponents
public SecurityRealm.SecurityComponents createSecurityComponents()
- Specified by:
createSecurityComponents
in classSecurityRealm
-
loadGroupByGroupname2
public GroupDetails loadGroupByGroupname2(String groupName, boolean fetchMembers)
- Overrides:
loadGroupByGroupname2
in classSecurityRealm
-
allowsSignup
public boolean allowsSignup()
- Overrides:
allowsSignup
in classSecurityRealm
-
getLoginUrl
public String getLoginUrl()
- Overrides:
getLoginUrl
in classSecurityRealm
-
-