public class OicSecurityRealm
extends hudson.security.SecurityRealm
| Modifier and Type | Class and Description |
|---|---|
static class |
OicSecurityRealm.DescriptorImpl |
| Constructor and Description |
|---|
OicSecurityRealm(String clientId,
String clientSecret,
String wellKnownOpenIDConfigurationUrl,
String tokenServerUrl,
String authorizationServerUrl,
String userInfoServerUrl,
String userNameField,
String tokenFieldToCheckKey,
String tokenFieldToCheckValue,
String fullNameFieldName,
String emailFieldName,
String scopes,
String groupsFieldName,
boolean disableSslVerification,
Boolean logoutFromOpenidProvider,
String endSessionEndpoint,
String postLogoutRedirectUrl,
boolean escapeHatchEnabled,
String escapeHatchUsername,
String escapeHatchSecret,
String escapeHatchGroup,
String automanualconfigure) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsField(com.google.api.client.json.GenericJson payload,
String field) |
hudson.security.SecurityRealm.SecurityComponents |
createSecurityComponents() |
org.kohsuke.stapler.HttpResponse |
doCommenceLogin(String from,
String referer)
Handles the the securityRealm/commenceLogin resource and sends the user off to the IdP
|
org.kohsuke.stapler.HttpResponse |
doEscapeHatch(String username,
String password) |
org.kohsuke.stapler.HttpResponse |
doFinishLogin(org.kohsuke.stapler.StaplerRequest request)
This is where the user comes back to at the end of the OpenID redirect ping-pong.
|
void |
doLogout(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
String |
getAuthenticationGatewayUrl() |
String |
getAuthorizationServerUrl() |
String |
getAutomanualconfigure() |
String |
getClientId() |
hudson.util.Secret |
getClientSecret() |
String |
getEmailFieldName() |
String |
getEndSessionEndpoint() |
String |
getEscapeHatchGroup() |
hudson.util.Secret |
getEscapeHatchSecret() |
String |
getEscapeHatchUsername() |
Object |
getField(com.google.api.client.json.GenericJson payload,
String field)
Looks up the value of a field by it's key based on some json.
|
String |
getFullNameFieldName() |
String |
getGroupsFieldName() |
String |
getLoginUrl() |
String |
getPostLogoutRedirectUrl() |
String |
getPostLogOutUrl(org.kohsuke.stapler.StaplerRequest req,
org.acegisecurity.Authentication auth) |
String |
getScopes() |
String |
getTokenFieldToCheckKey() |
String |
getTokenFieldToCheckValue() |
String |
getTokenServerUrl() |
String |
getUserInfoServerUrl() |
String |
getUserNameField() |
String |
getWellKnownOpenIDConfigurationUrl() |
boolean |
isDisableSslVerification() |
boolean |
isEscapeHatchEnabled() |
boolean |
isLogoutFromOpenidProvider() |
all, allowsSignup, canLogOut, commenceSignup, createCliAuthenticator, createFilter, doCaptcha, findBean, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getFrom, getGroupIdStrategy, getSecurityComponents, getUserIdStrategy, loadGroupByGroupname, loadGroupByGroupname, loadUserByUsername, setCaptchaSupport, validateCaptcha@DataBoundConstructor public OicSecurityRealm(String clientId, String clientSecret, String wellKnownOpenIDConfigurationUrl, String tokenServerUrl, String authorizationServerUrl, String userInfoServerUrl, String userNameField, String tokenFieldToCheckKey, String tokenFieldToCheckValue, String fullNameFieldName, String emailFieldName, String scopes, String groupsFieldName, boolean disableSslVerification, Boolean logoutFromOpenidProvider, String endSessionEndpoint, String postLogoutRedirectUrl, boolean escapeHatchEnabled, String escapeHatchUsername, String escapeHatchSecret, String escapeHatchGroup, String automanualconfigure) throws IOException
IOExceptionpublic String getClientId()
public hudson.util.Secret getClientSecret()
public String getWellKnownOpenIDConfigurationUrl()
public String getTokenServerUrl()
public String getAuthorizationServerUrl()
public String getUserInfoServerUrl()
public String getUserNameField()
public String getTokenFieldToCheckKey()
public String getTokenFieldToCheckValue()
public String getFullNameFieldName()
public String getEmailFieldName()
public String getGroupsFieldName()
public String getScopes()
public boolean isDisableSslVerification()
public boolean isLogoutFromOpenidProvider()
public String getEndSessionEndpoint()
public String getPostLogoutRedirectUrl()
public boolean isEscapeHatchEnabled()
public String getEscapeHatchUsername()
public hudson.util.Secret getEscapeHatchSecret()
public String getEscapeHatchGroup()
public String getAutomanualconfigure()
public String getLoginUrl()
getLoginUrl in class hudson.security.SecurityRealmpublic String getAuthenticationGatewayUrl()
getAuthenticationGatewayUrl in class hudson.security.SecurityRealmpublic hudson.security.SecurityRealm.SecurityComponents createSecurityComponents()
createSecurityComponents in class hudson.security.SecurityRealmpublic org.kohsuke.stapler.HttpResponse doCommenceLogin(@QueryParameter
String from,
@Header(value="Referer")
String referer)
from - the relative URL to the page that the user has just come fromreferer - the HTTP referer header (where to redirect the user back to after login has finished)HttpResponse objectpublic org.kohsuke.stapler.HttpResponse doEscapeHatch(@QueryParameter(value="j_username")
String username,
@QueryParameter(value="j_password")
String password)
public void doLogout(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
doLogout in class hudson.security.SecurityRealmIOExceptionjavax.servlet.ServletExceptionpublic String getPostLogOutUrl(org.kohsuke.stapler.StaplerRequest req, org.acegisecurity.Authentication auth)
getPostLogOutUrl in class hudson.security.SecurityRealmpublic org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest request)
request - The user's requestpublic Object getField(com.google.api.client.json.GenericJson payload, String field)
{
"do": {
"re.mi": "a"
},
"do": {
"re": {
"mi": "b"
}
},
"do.re": {
"mi": "c"
}
"do.re.mi": "d",
}
'do.re.mi' -> 'd'
'do"re.mi' -> 'a'
'do"re"mi' -> 'b'
'do.re"mi' -> 'c'
payload - json payload to searchfield - field keypublic boolean containsField(com.google.api.client.json.GenericJson payload,
String field)
payload - parsed jsonfield - to lookup a valuegetField(GenericJson, String)Copyright © 2016–2020. All rights reserved.