OAuth2-client

Implements OAuth2 authentication on top of Open-Server security

License

License

Categories

Categories

H2 Data Databases OAuth2 Security CLI User Interface
GroupId

GroupId

com.wadpam.oauth
ArtifactId

ArtifactId

oauth2-client
Last Version

Last Version

1.9
Release Date

Release Date

Type

Type

jar
Description

Description

OAuth2-client
Implements OAuth2 authentication on top of Open-Server security
Project URL

Project URL

http://github.com/sosandstrom/oauth2-client
Source Code Management

Source Code Management

https://github.com/sosandstrom/oauth2-client

Download oauth2-client

How to add to project

<!-- https://jarcasting.com/artifacts/com.wadpam.oauth/oauth2-client/ -->
<dependency>
    <groupId>com.wadpam.oauth</groupId>
    <artifactId>oauth2-client</artifactId>
    <version>1.9</version>
</dependency>
// https://jarcasting.com/artifacts/com.wadpam.oauth/oauth2-client/
implementation 'com.wadpam.oauth:oauth2-client:1.9'
// https://jarcasting.com/artifacts/com.wadpam.oauth/oauth2-client/
implementation ("com.wadpam.oauth:oauth2-client:1.9")
'com.wadpam.oauth:oauth2-client:jar:1.9'
<dependency org="com.wadpam.oauth" name="oauth2-client" rev="1.9">
  <artifact name="oauth2-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.wadpam.oauth', module='oauth2-client', version='1.9')
)
libraryDependencies += "com.wadpam.oauth" % "oauth2-client" % "1.9"
[com.wadpam.oauth/oauth2-client "1.9"]

Dependencies

compile (18)

Group / Artifact Type Version
net.sf.mardao : mardao-core jar 2.3.3
com.wadpam.openserver : domain jar 29
com.wadpam.openserver : errors jar 29
com.wadpam.openserver : json jar 29
com.wadpam.openserver : mvc-boiler jar 29
com.wadpam.openserver : security jar 29
com.wadpam.openserver : transactions jar 29
org.springframework : spring-core jar 3.1.1.RELEASE
org.springframework : spring-webmvc jar 3.1.1.RELEASE
org.springframework.social : spring-social-core jar 1.1.0.M1
org.springframework.social : spring-social-facebook jar 1.1.0.M1
org.springframework.social : spring-social-google jar 1.0.0.M2
org.springframework.social : spring-social-twitter jar 1.1.0.M1
org.springframework.social » spring-social-salesforce jar 1.0
com.goldengekko.social » spring-social-gaelic jar 1.0
com.wadpam : docrest-api jar 1.22
org.slf4j : slf4j-api jar 1.6.1
commons-logging : commons-logging jar 1.1.1

provided (3)

Group / Artifact Type Version
net.sf.mardao : mardao-gae jar 2.3.3
com.wadpam.opencomponents : users jar 1
javax.servlet : servlet-api jar 2.5

test (6)

Group / Artifact Type Version
junit : junit jar 4.8.1
org.slf4j : slf4j-log4j12 jar 1.6.1
org.easymock : easymock jar 2.5.2
org.easymock : easymockclassextension jar 2.5.2
org.springframework : spring-test jar 3.1.1.RELEASE
com.wadpam.openserver : test jar 29

Project Modules

There are no modules declared in this project.

oauth2-client

Library to be used by a service acting as an OAuth2 client.

Three main components

  1. OAuth2Service, which contains the business logic
  2. OAuth2Interceptor, which authenticates requests based on registered tokens
  3. OAuth2Controller, which provides methods to register and unregister a federated token

API docs

For API documentation, please see src/main/apidocs.

Auto-register your federated token

The OAuth2Interceptor has a feature to auto-register a federated token. If the token is not found locally, and the following parameters are present on the request

  • providerId
  • providerUserId

then the interceptor will invoke the registerFederated() method on the OAuth2Service, and retry the authentication. For this support, the OAuth2Service must be wired to the OAuth2Interceptor, and the user must have an existing connection with the federated provider.

Versions

Version
1.9
1.4