本文整理了Java中hudson.model.Hudson.getSecretKey()
方法的一些代码示例,展示了Hudson.getSecretKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getSecretKey()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getSecretKey
[英]Returns a secret key that survives across container start/stop.
This value is useful for implementing some of the security features.
[中]返回一个密钥,该密钥在容器启动/停止期间有效。
此值对于实现某些安全功能非常有用。
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
private String getSecretKey() {
return Hudson.getInstance().getSecretKey();
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
private String getSecretKey() {
return Hudson.getInstance().getSecretKey();
}
代码示例来源:origin: hudson/hudson-2.x
private String getSecretKey() {
return Hudson.getInstance().getSecretKey();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
private String getSecretKey() {
return Hudson.getInstance().getSecretKey();
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public DescriptorImpl() {
super(Hudson.getInstance().getSecretKey(), System.getProperty("hudson.security.csrf.requestfield", ".crumb"));
load();
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public DescriptorImpl() {
super(Hudson.getInstance().getSecretKey(), System.getProperty("hudson.security.csrf.requestfield", ".crumb"));
load();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public DescriptorImpl() {
super(Hudson.getInstance().getSecretKey(), System.getProperty("hudson.security.csrf.requestfield", ".crumb"));
load();
}
代码示例来源:origin: hudson/hudson-2.x
public DescriptorImpl() {
super(Hudson.getInstance().getSecretKey(), System.getProperty("hudson.security.csrf.requestfield", ".crumb"));
load();
}
代码示例来源:origin: hudson/hudson-2.x
.append(',')
.append("{version:")
.append(QuotedStringTokenizer.quote(Hudson.VERSION + "-" + Util.getDigestOf(Hudson.getInstance().getSecretKey())))
.append('}')
.append(',')
代码示例来源:origin: hudson/hudson-2.x
private static RememberMeServices createRememberMeService(UserDetailsService uds) {
// create our default TokenBasedRememberMeServices, which depends on the availability of the secret key
TokenBasedRememberMeServices2 rms = new TokenBasedRememberMeServices2();
rms.setUserDetailsService(uds);
rms.setKey(Hudson.getInstance().getSecretKey());
rms.setParameter("remember_me"); // this is the form field name in login.jelly
return rms;
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
.append(',')
.append("{version:")
.append(QuotedStringTokenizer.quote(Hudson.VERSION + "-" + Util.getDigestOf(Hudson.getInstance().getSecretKey())))
.append('}')
.append(',')
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
.append(',')
.append("{version:")
.append(QuotedStringTokenizer.quote(Hudson.VERSION + "-" + Util.getDigestOf(Hudson.getInstance().getSecretKey())))
.append('}')
.append(',')
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
private static RememberMeServices createRememberMeService(UserDetailsService uds) {
// create our default TokenBasedRememberMeServices, which depends on the availability of the secret key
TokenBasedRememberMeServices2 rms = new TokenBasedRememberMeServices2();
rms.setUserDetailsService(uds);
rms.setKey(Hudson.getInstance().getSecretKey());
rms.setParameter("remember_me"); // this is the form field name in login.jelly
return rms;
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
private static RememberMeServices createRememberMeService(UserDetailsService uds) {
// create our default TokenBasedRememberMeServices, which depends on the availability of the secret key
TokenBasedRememberMeServices2 rms = new TokenBasedRememberMeServices2();
rms.setUserDetailsService(uds);
rms.setKey(Hudson.getInstance().getSecretKey());
rms.setParameter("remember_me"); // this is the form field name in login.jelly
return rms;
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
public SecurityComponents createSecurityComponents() {
// this does all the hard work
Authenticator authenticator = new Authenticator();
// these providers apply everywhere
RememberMeAuthenticationProvider rememberMeAuthenticationProvider = new RememberMeAuthenticationProvider();
rememberMeAuthenticationProvider.setKey(Hudson.getInstance().getSecretKey());
// this doesn't mean we allow anonymous access.
// we just authenticate anonymous users as such,
// so that later authorization can reject them if so configured
AnonymousAuthenticationProvider anonymousAuthenticationProvider = new AnonymousAuthenticationProvider();
anonymousAuthenticationProvider.setKey("anonymous");
AuthenticationProvider[] authenticationProvider = {
authenticator,
rememberMeAuthenticationProvider,
anonymousAuthenticationProvider
};
ProviderManager providerManager = new ProviderManager();
providerManager.setProviders(Arrays.asList(authenticationProvider));
return new SecurityComponents(providerManager);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Builds up the environment variable map that's sufficient to identify a process
* as ours. This is used to kill run-away processes via {@link ProcessTree#killAll(Map)}.
*/
public final EnvVars getCharacteristicEnvVars() {
EnvVars env = new EnvVars();
env.put("HUDSON_SERVER_COOKIE",Util.getDigestOf("ServerID:"+Hudson.getInstance().getSecretKey()));
env.put("BUILD_NUMBER",String.valueOf(number));
env.put("BUILD_ID",getId());
env.put("BUILD_TAG","hudson-"+getParent().getName()+"-"+number);
env.put("JOB_NAME",getParent().getFullName());
return env;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Builds up the environment variable map that's sufficient to identify a process
* as ours. This is used to kill run-away processes via {@link ProcessTree#killAll(Map)}.
*/
public final EnvVars getCharacteristicEnvVars() {
EnvVars env = new EnvVars();
env.put("HUDSON_SERVER_COOKIE",Util.getDigestOf("ServerID:"+Hudson.getInstance().getSecretKey()));
env.put("BUILD_NUMBER",String.valueOf(number));
env.put("BUILD_ID",getId());
env.put("BUILD_TAG","hudson-"+getParent().getName()+"-"+number);
env.put("JOB_NAME",getParent().getFullName());
return env;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Builds up the environment variable map that's sufficient to identify a process
* as ours. This is used to kill run-away processes via {@link ProcessTree#killAll(Map)}.
*/
public final EnvVars getCharacteristicEnvVars() {
EnvVars env = new EnvVars();
env.put("HUDSON_SERVER_COOKIE",Util.getDigestOf("ServerID:"+Hudson.getInstance().getSecretKey()));
env.put("BUILD_NUMBER",String.valueOf(number));
env.put("BUILD_ID",getId());
env.put("BUILD_TAG","hudson-"+getParent().getName()+"-"+number);
env.put("JOB_NAME",getParent().getFullName());
return env;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Builds up the environment variable map that's sufficient to identify a
* process as ours. This is used to kill run-away processes via
* {@link ProcessTree#killAll(Map)}.
*/
public final EnvVars getCharacteristicEnvVars() {
EnvVars env = new EnvVars();
env.put("HUDSON_SERVER_COOKIE", Util.getDigestOf("ServerID:" + Hudson.getInstance().getSecretKey()));
env.put("BUILD_NUMBER", String.valueOf(number));
env.put("BUILD_ID", getId());
env.put("BUILD_TAG", "hudson-" + getParent().getName() + "-" + number);
env.put("JOB_NAME", getParent().getFullName());
return env;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
rememberMeAuthenticationProvider.setKey(Hudson.getInstance().getSecretKey());
内容来源于网络,如有侵权,请联系作者删除!