Package hudson.security.csrf
Class DefaultCrumbIssuer
java.lang.Object
hudson.security.csrf.CrumbIssuer
hudson.security.csrf.DefaultCrumbIssuer
- All Implemented Interfaces:
ExtensionPoint,Describable<CrumbIssuer>
A crumb issuing algorithm based on the request principal and the session ID.
- Author:
- dty
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classNested classes/interfaces inherited from class hudson.security.csrf.CrumbIssuer
CrumbIssuer.RestrictedApiNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class hudson.security.csrf.CrumbIssuer
DEFAULT_CRUMB_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.This setting is no longer effective.protected StringissueCrumb(jakarta.servlet.ServletRequest request, String salt) Create a crumb value based on user specific information in the request.booleanvalidateCrumb(jakarta.servlet.ServletRequest request, String salt, String crumb) Validate a previously created crumb against information in the current request.Methods inherited from class hudson.security.csrf.CrumbIssuer
all, getApi, getCrumb, getCrumb, getCrumb, getCrumbRequestField, getDescriptor, initStaplerCrumbIssuer, issueCrumb, validateCrumb, validateCrumb, validateCrumb, validateCrumb
-
Field Details
-
EXCLUDE_SESSION_ID
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean EXCLUDE_SESSION_ID
-
-
Constructor Details
-
DefaultCrumbIssuer
@DataBoundConstructor public DefaultCrumbIssuer() -
DefaultCrumbIssuer
Deprecated.UseDefaultCrumbIssuer()instead.- Parameters:
excludeClientIPFromCrumb- unused
-
-
Method Details
-
isExcludeClientIPFromCrumb
Deprecated.This setting is no longer effective.- Returns:
- the previously set value
-
issueCrumb
Description copied from class:CrumbIssuerCreate a crumb value based on user specific information in the request. The crumb should be generated by building a cryptographic hash of:- relevant information in the request that can uniquely identify the client
- the salt value
- an implementation specific guarded secret.
- Overrides:
issueCrumbin classCrumbIssuer
-
validateCrumb
Description copied from class:CrumbIssuerValidate a previously created crumb against information in the current request.- Overrides:
validateCrumbin classCrumbIssuer- Parameters:
crumb- The previously generated crumb to validate against information in the current request
-
DefaultCrumbIssuer()instead.