Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AuthSCH-Java-Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Várkonyi Kornél
AuthSCH-Java-Client
Commits
6da9f67a
Commit
6da9f67a
authored
7 years ago
by
Gerviba
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parents
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+76
-0
76 additions, 0 deletions
README.md
with
76 additions
and
0 deletions
README.md
0 → 100644
+
76
−
0
View file @
6da9f67a
AuthSch Java API
===
## Usage
### Getting started
-
You need to have an auth.sch account.
-
Register a new application.
-
Include the api to your project
-
Note tthat this project is depends on gson library:
```
XML
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
```
### Initialize
```
java
AuthSchAPI
api
=
new
AuthSchAPI
();
api
.
setClientIdentifier
(
"20 digit number"
);
api
.
setClientKey
(
"80 chars key"
);
```
Store the api instance in application scope.
### Generate url example
```
java
api
.
generateLoginUrl
(
hashedSessionId
,
Scope
.
BASIC
,
Scope
.
GIVEN_NAME
,
Scope
.
MAIL
));
```
You can also use a list of Scopes.
### Validate code and get tokens
```
java
AuthResponse
auth
=
api
.
validateAuthentication
(
code
);
```
### Refresh the token
It will return a new AuthRespone instance.
```
java
AuthResponse
auth
=
api
.
refreshToken
(
refreshToken
);
```
### Get profile data
```
java
ProfileDataResponse
profile
=
api
.
getProfile
(
accessToken
);
```
## Maven shade
TODO
## List of projects
-
beugro.sch (Not released)
> Submit your of if you have.
## License
**
"THE BEER-WARE LICENSE" (Revision 42):
**
<br>
<br>
<
gerviba@gerviba.hu
>
wrote this file. As long as you retain this notice you
<br>
can do whatever you want with this stuff. If we meet some day, and you think
<br>
this stuff is worth it, you can buy me a beer in return. Szabó Gergely
<br>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment