Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Commit a2f2f66

Browse files
committed
Merge pull request #176 from tkrille/support-merge
Remove distinction between auth- and resource-server
2 parents 012a979 + 7530319 commit a2f2f66

20 files changed

+161
-332
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@ This repository contains the OSIAM Connector for Java.
1212

1313
The current version can be found at http://search.maven.org/#search|ga|1|osiam.
1414

15-
Together with the OSIAM server it provides an easy to use OAuth2 SCIM based user
16-
login for Java.
15+
Together with OSIAM it provides an easy to use OAuth2 SCIM based user login for
16+
Java.
1717

1818
## Short OSIAM introduction
1919

2020
OSIAM provides an easy and secure oauth2 standard login of users. It is also
21-
possible to assign users to groups with different roles.
22-
23-
It is possible to run a dedicated OSIAM User and Group Server or to connect to
24-
an existing identity provider (like login over facebook).
21+
possible to assign users to groups with different roles. It is also possible to
22+
connect to an existing identity provider (like login over facebook).
2523

2624
OSIAM provides three different ways to log in:
2725

@@ -31,13 +29,13 @@ OSIAM provides three different ways to log in:
3129
user is used for login)
3230

3331
- 1 Step login: The user can provide his login and password to your application
34-
and you can get the security credentials directly from the OSIAM server
35-
without a required authorization from the user
32+
and you can get the security credentials directly from OSIAM without a
33+
required authorization from the user
3634

37-
- direct login: It is possible to get a security credentials directly from the
38-
OSIAM server without the need of any user data
35+
- direct login: It is possible to get a security credentials directly from OSIAM
36+
without the need of any user data
3937

40-
The different ways to login depend on the configured grants on the OSIAM server.
38+
The different ways to login depend on the configured grants in OSIAM.
4139

4240

4341
OSIAM does not depend on any programming language.

docs/create-osiam-connector.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@ using the `OsiamConnector.Builder()` class.
44

55
```java
66
OsiamConnector osiamConnector = new OsiamConnector.Builder()
7-
.setAuthServerEndpoint(AUTH_ENDPOINT_ADDRESS)
8-
.setResourceServerEndpoint(RESOURCE_ENDPOINT_ADDRESS)
9-
.setClientId(CLIENT_ID)
10-
.setClientSecret(CLIENT_SECRET)
11-
.build();
12-
```
13-
14-
In case your auth and resource server are located at the same location and
15-
follow the specified naming convention you can also use:
16-
17-
```java
18-
OsiamConnector osiamConnector = new OsiamConnector.Builder()
19-
.setEndpoint(SERVER_ENDPOINT_ADDRESS)
7+
.setEndpoint(OSIAM_ENDPOINT)
208
.setClientId(CLIENT_ID)
219
.setClientSecret(CLIENT_SECRET)
2210
.build();

docs/exceptions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,26 @@ thrown if an invalid argument has been given (e.g. an AccessToken that is null).
2828
### ConnectionInitializationException
2929

3030
The ConnectionInitializationException extends the OsiamClientException and will
31-
be thrown if no connection to the OSIAM server could be created.
31+
be thrown if no connection to OSIAM could be created.
3232

3333
### OsiamRequestException
3434

3535
The OsiamRequestException extends the OsiamClientException. It is the base
36-
exception of all exceptions that indicate that the connection to the server was
36+
exception of all exceptions that indicate that the connection to OSIAM was
3737
successful but something else went wrong. This and all child exceptions will
3838
also provide a method to retrieve the HTTP status code which raised the
3939
exception.
4040

4141
int getHttpStatusCode()
4242

43-
This exception will be raised if an unknown error is returned by the server.
44-
Known errors are represented by child exceptions described below.
43+
This exception will be raised if an unknown error is returned by OSIAM. Known
44+
errors are represented by child exceptions described below.
4545

4646
#### ConflictException
4747

4848
The ConflictException extends the OsiamRequestException and will be thrown if
49-
any conflicts happened while processing the request on the server (HTTP status
50-
code 409).
49+
any conflicts happened while processing the request by OSIAM (HTTP status code
50+
409).
5151

5252
#### ForbiddenException
5353

docs/login-and-getting-an-access-token.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ For general information about the different OAuth 2.0 grant types please see
44
the [Overview of Osiam]
55
(https://github.com/osiam/osiam/blob/master/docs/OSIAM-Overview.md#oauth-20).
66
A more technical explanation can be found in the [API documentation]
7-
(https://github.com/osiam/auth-server/blob/master/docs/api_documentation.md#oauth2).
7+
(https://github.com/osiam/osiam/blob/master/docs/api_documentation.md#oauth2).
88

99
Table of contents
1010
- [Retrieving an access token](login-and-getting-an-access-token.md#retrieving-an-access-token)
@@ -18,25 +18,25 @@ Table of contents
1818
You access token will have some scopes to grant access to the different
1919
procedures.
2020

21-
The supported scopes in OSIAM are listed [here](https://github.com/osiam/auth-server/blob/master/docs/api_documentation
21+
The supported scopes in OSIAM are listed [here](https://github.com/osiam/osiam/blob/master/docs/api_documentation
2222
.md#supported-scopes)
2323

2424
With **new Scope("your scope");** you can also create and add your own scopes that you need an your application
2525

2626
# Retrieving an access token
2727

28-
In a trusted environment getting an access token from the OAuth 2.0 server
29-
implies a successful login of the user.
28+
In a trusted environment getting an access token from OSIAM implies a successful
29+
login of the user.
3030

31-
## [Authorization Code Grant](https://github.com/osiam/auth-server/blob/master/docs/api_documentation.md#authorization-code-grant)
31+
## [Authorization Code Grant](https://github.com/osiam/osiam/blob/master/docs/api_documentation.md#authorization-code-grant)
3232

3333
The authorization code grant should always be used as default grant, as other
3434
grants are less secure and should only be used if you know what you are doing.
3535

3636
It takes to steps to get an access token using the authorization code grant:
3737

38-
1. Redirect the user to the OAuth 2.0 server and let the user login. You will
39-
get an **auth code**.
38+
1. Redirect the user to OSIAM and let the user login. You will get an
39+
**auth code**.
4040
2. Send the auth code to the OAuth 2.0 in exchange for the access token.
4141

4242
To do so follow these steps:
@@ -45,12 +45,12 @@ To do so follow these steps:
4545

4646
OsiamConnector oConnector = [Retrieving an OsiamConnector](create-osiam-connector.md#grant-authorization-code)
4747

48-
* Redirect the user to the Auth Server. You can get the redirect URI with the
48+
* Redirect the user to OSIAM. You can get the redirect URI with the
4949
following command:
5050

5151
URI redirectURI = oConnector.getRedirectLoginUri(Scope.GET, Scope.PUT);
5252

53-
* After the user is successfully authenticated the auth server redirects the
53+
* After the user is successfully authenticated, OSIAM redirects the
5454
user back to your application's redirect URI.
5555

5656
* If everything went fine you will receive the following parameter
@@ -61,7 +61,7 @@ user back to your application's redirect URI.
6161

6262
<YOUR_REDIRECT_URI>?error=access_denied&error_description=User+denied+access
6363

64-
* Send the auth code to the auth server in order to get the access token
64+
* Send the auth code to OSIAM in order to get the access token
6565

6666
AccessToken accessToken = oConnector.retrieveAccessToken(<AUTHENTICATION_CODE>);
6767

@@ -73,9 +73,9 @@ AccessToken the following way
7373

7474
AccessToken accessToken = new AccessToken.Builder(<token>).build();
7575

76-
## [Resource Owner Password Credentials Grant](https://github.com/osiam/auth-server/blob/master/docs/api_documentation.md#resource-owner-password-credentials-grant)
76+
## [Resource Owner Password Credentials Grant](https://github.com/osiam/osiam/blob/master/docs/api_documentation.md#resource-owner-password-credentials-grant)
7777
and
78-
## [Client Credentials Grant](https://github.com/osiam/auth-server/blob/master/docs/api_documentation.md#client-credentials-grant)
78+
## [Client Credentials Grant](https://github.com/osiam/osiam/blob/master/docs/api_documentation.md#client-credentials-grant)
7979

8080
The OSIAM Connector4java allows you to retrieve an
8181
**org.osiam.client.oauth.accessToken**. The access token is required to access

docs/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ and provides an easy to use Java API that enables user logins or the
33
administration of users, groups and their interactions.
44

55
OSIAM provides a time limited access token that regulates the access to
6-
resources at any one time.
7-
For this purpose the Connector4java API enables an easy way to retrieve this
8-
token on different ways depending on your rights at the OSIAM server.
6+
resources at any one time. For this purpose the Connector4java API enables an
7+
easy way to retrieve this token on different ways depending on your rights in
8+
OSIAM.
99

1010
More information about the login, retrieving an access token and the possible
1111
grants can be found [here](login-and-getting-an-access-token.md).

docs/vertx-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class Main {
2626

2727
{
2828
oConnector = new OsiamConnector.Builder()
29-
.setEndpoint("http://localhost:8180/osiam-server")
29+
.setEndpoint("http://localhost:8180/osiam")
3030
.setClientId("example-client")
3131
.setClientSecret("secret")
3232
.setClientRedirectUri("http://localhost:5000/oauth2")

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<groupId>org.osiam</groupId>
2828
<artifactId>connector4java</artifactId>
29-
<version>1.8-SNAPSHOT</version>
29+
<version>2.0-SNAPSHOT</version>
3030

3131
<name>OSIAM Connector 4 Java</name>
3232
<description>Native Java API to connect to the REST based OSIAM services</description>
@@ -74,7 +74,7 @@
7474
<dependency>
7575
<groupId>org.osiam</groupId>
7676
<artifactId>scim-schema</artifactId>
77-
<version>1.6-SNAPSHOT</version>
77+
<version>2.0-SNAPSHOT</version>
7878
</dependency>
7979

8080
<dependency>

src/main/java/org/osiam/client/AbstractOsiamService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
*/
7272
abstract class AbstractOsiamService<T extends Resource> {
7373

74-
protected static final String CONNECTION_SETUP_ERROR_STRING = "Cannot connect to server";
74+
protected static final String CONNECTION_SETUP_ERROR_STRING = "Cannot connect to OSIAM";
7575

7676
protected static final String AUTHORIZATION = "Authorization";
7777
protected static final String BEARER = "Bearer ";

src/main/java/org/osiam/client/AuthService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ public Builder setClientId(String clientId) {
587587
/**
588588
* Add a Client redirect URI to the OAuth2 request
589589
*
590-
* @param clientRedirectUri the clientRedirectUri which is known to the OSIAM server
590+
* @param clientRedirectUri the clientRedirectUri which is known to OSIAM
591591
* @return The builder itself
592592
*/
593593
public Builder setClientRedirectUri(String clientRedirectUri) {

0 commit comments

Comments
 (0)