Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
sso
Commits
73931906
Commit
73931906
authored
Jul 24, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
7e598fcc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
29 deletions
+20
-29
OAuthApi.java
src/main/java/com/egolm/sso/api/OAuthApi.java
+2
-7
OAuthConfig.java
src/main/java/com/egolm/sso/api/OAuthConfig.java
+5
-1
OAuthToken.java
src/main/java/com/egolm/sso/api/OAuthToken.java
+13
-21
No files found.
src/main/java/com/egolm/sso/api/OAuthApi.java
View file @
73931906
...
@@ -50,13 +50,8 @@ public interface OAuthApi {
...
@@ -50,13 +50,8 @@ public interface OAuthApi {
Long
expiresIn
=
oAuthResponse
.
getExpiresIn
();
Long
expiresIn
=
oAuthResponse
.
getExpiresIn
();
String
idToken
=
oAuthResponse
.
getParam
(
"id_token"
);
String
idToken
=
oAuthResponse
.
getParam
(
"id_token"
);
String
tokenType
=
oAuthResponse
.
getTokenType
();
String
tokenType
=
oAuthResponse
.
getTokenType
();
OAuthToken
tokenObj
=
new
OAuthToken
();
OAuthToken
token
=
new
OAuthToken
(
accessToken
,
refreshToken
,
idToken
,
tokenType
,
expiresIn
);
tokenObj
.
setAccessToken
(
accessToken
);
return
token
;
tokenObj
.
setRefreshToken
(
refreshToken
);
tokenObj
.
setIdToken
(
idToken
);
tokenObj
.
setTokenType
(
tokenType
);
tokenObj
.
setExpiresIn
(
expiresIn
);
return
tokenObj
;
}
}
}
}
src/main/java/com/egolm/sso/api/OAuthConfig.java
View file @
73931906
package
com
.
egolm
.
sso
.
api
;
package
com
.
egolm
.
sso
.
api
;
public
class
OAuthConfig
{
import
java.io.Serializable
;
public
class
OAuthConfig
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1874417633433974015L
;
private
String
clientId
;
private
String
clientId
;
private
String
clientSecret
;
private
String
clientSecret
;
private
String
clientScope
;
private
String
clientScope
;
...
...
src/main/java/com/egolm/sso/api/OAuthToken.java
View file @
73931906
package
com
.
egolm
.
sso
.
api
;
package
com
.
egolm
.
sso
.
api
;
public
class
OAuthToken
{
import
java.io.Serializable
;
public
class
OAuthToken
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
73234152183180980L
;
private
String
accessToken
;
private
String
accessToken
;
private
String
refreshToken
;
private
String
refreshToken
;
private
String
idToken
;
private
String
idToken
;
private
String
tokenType
;
private
String
tokenType
;
private
Long
expiresIn
;
private
Long
expiresIn
;
public
OAuthToken
(
String
accessToken
,
String
refreshToken
,
String
idToken
,
String
tokenType
,
Long
expiresIn
)
{
this
.
accessToken
=
accessToken
;
this
.
refreshToken
=
refreshToken
;
this
.
idToken
=
idToken
;
this
.
tokenType
=
tokenType
;
this
.
expiresIn
=
expiresIn
;
}
public
String
getAccessToken
()
{
public
String
getAccessToken
()
{
return
accessToken
;
return
accessToken
;
}
}
public
void
setAccessToken
(
String
accessToken
)
{
this
.
accessToken
=
accessToken
;
}
public
String
getRefreshToken
()
{
public
String
getRefreshToken
()
{
return
refreshToken
;
return
refreshToken
;
}
}
public
void
setRefreshToken
(
String
refreshToken
)
{
this
.
refreshToken
=
refreshToken
;
}
public
String
getIdToken
()
{
public
String
getIdToken
()
{
return
idToken
;
return
idToken
;
}
}
public
void
setIdToken
(
String
idToken
)
{
this
.
idToken
=
idToken
;
}
public
String
getTokenType
()
{
public
String
getTokenType
()
{
return
tokenType
;
return
tokenType
;
}
}
public
void
setTokenType
(
String
tokenType
)
{
this
.
tokenType
=
tokenType
;
}
public
Long
getExpiresIn
()
{
public
Long
getExpiresIn
()
{
return
expiresIn
;
return
expiresIn
;
}
}
public
void
setExpiresIn
(
Long
expiresIn
)
{
this
.
expiresIn
=
expiresIn
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment