Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
74de7992
提交
74de7992
authored
7 年前
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add missing package.html and copyright headers
上级
4525519a
master
version-1.4.198
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
68 行增加
和
8 行删除
+68
-8
UserBuilder.java
h2/src/main/org/h2/engine/UserBuilder.java
+20
-7
AssignRealmNameRole.java
...c/main/org/h2/security/auth/impl/AssignRealmNameRole.java
+5
-0
StaticUserCredentialsValidator.java
...h2/security/auth/impl/StaticUserCredentialsValidator.java
+1
-1
package.html
h2/src/main/org/h2/security/auth/impl/package.html
+14
-0
package.html
h2/src/main/org/h2/security/auth/package.html
+14
-0
package.html
h2/src/test/org/h2/test/auth/package.html
+14
-0
没有找到文件。
h2/src/main/org/h2/engine/UserBuilder.java
浏览文件 @
74de7992
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
engine
;
package
org
.
h2
.
engine
;
import
org.h2.security.auth.AuthenticationInfo
;
import
org.h2.security.auth.AuthenticationInfo
;
...
@@ -6,16 +11,24 @@ import org.h2.util.MathUtils;
...
@@ -6,16 +11,24 @@ import org.h2.util.MathUtils;
public
class
UserBuilder
{
public
class
UserBuilder
{
/**
/**
* build the database user starting from authentication informations
* Build the database user starting from authentication informations.
* @param authenticationInfo = authentication info
*
* @param database = target database
* @param authenticationInfo
* @param persistent = true if the user will be persisted in the database
* authentication info
* @param database
* target database
* @param persistent
* true if the user will be persisted in the database
* @return user bean
* @return user bean
*/
*/
public
static
User
buildUser
(
AuthenticationInfo
authenticationInfo
,
Database
database
,
boolean
persistent
)
{
public
static
User
buildUser
(
AuthenticationInfo
authenticationInfo
,
Database
database
,
boolean
persistent
)
{
User
user
=
new
User
(
database
,
persistent
?
database
.
allocateObjectId
()
:
-
1
,
authenticationInfo
.
getFullyQualifiedName
(),
false
);
User
user
=
new
User
(
database
,
persistent
?
database
.
allocateObjectId
()
:
-
1
,
//In case of external authentication fill the password hash with random data
authenticationInfo
.
getFullyQualifiedName
(),
false
);
user
.
setUserPasswordHash
(
authenticationInfo
.
getRealm
()==
null
?
authenticationInfo
.
getConnectionInfo
().
getUserPasswordHash
():
MathUtils
.
secureRandomBytes
(
64
));
// In case of external authentication fill the password hash with random
// data
user
.
setUserPasswordHash
(
authenticationInfo
.
getRealm
()
==
null
?
authenticationInfo
.
getConnectionInfo
().
getUserPasswordHash
()
:
MathUtils
.
secureRandomBytes
(
64
));
user
.
setTemporary
(!
persistent
);
user
.
setTemporary
(!
persistent
);
return
user
;
return
user
;
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/security/auth/impl/AssignRealmNameRole.java
浏览文件 @
74de7992
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: Alessandro Ventura
*/
package
org
.
h2
.
security
.
auth
.
impl
;
package
org
.
h2
.
security
.
auth
.
impl
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/security/auth/impl/StaticUserCredentialsValidator.java
浏览文件 @
74de7992
/*
/*
* Copyright 2004-2018 H2 Group. Mul
tiple-Licensed under the MPL 2.0,
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: Alessandro Ventura
* Initial Developer: Alessandro Ventura
*/
*/
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/security/auth/impl/package.html
0 → 100644
浏览文件 @
74de7992
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
Authentication classes.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/security/auth/package.html
0 → 100644
浏览文件 @
74de7992
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
Authentication classes.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/auth/package.html
0 → 100644
浏览文件 @
74de7992
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
Javadoc package documentation
</title></head><body
style=
"font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"
><p>
Tests for custom authentication.
</p></body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论