oauth2-java-client

OAuth2 Java Client

Лицензия

Лицензия

Категории

Категории

Java Языки программирования H2 Данные Базы данных Безопасность OAuth2 CLI Взаимодействие с пользователем
Группа

Группа

com.clouway.security
Идентификатор

Идентификатор

oauth2-java-client
Последняя версия

Последняя версия

0.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

oauth2-java-client
OAuth2 Java Client
Ссылка на сайт

Ссылка на сайт

https://github.com/clouway/oauth2-java-client
Система контроля версий

Система контроля версий

https://github.com/clouway/oauth2-java-client

Скачать oauth2-java-client

Как подключить последнюю версию

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

OAuth2 java client

A client library which uses oauth client secrets to send authorized requests or generate access tokens

OAuth2 client for console apps

Send authorized request, with access token generated by Google OAuth server, using google http client library
OАuthClientConfig config = OАuthClientConfig
       .setClient("::client::")
       .setSecret("::secret::")
       .setScopes(setOf("scope1", "scope2"))
       //you can pass other implementation of CredentialsStore, like - CredentialsDatabase
       .setCredentialsStorage(LocalCredentialsFileStorage(filePath))
       .build()
             
HttpRequestFactory factory = NetHttpTransport().createRequestFactory(
         BearerTokenInterceptor.newGoogleInterceptor(config))
 
 // do HTTP call

NOTE: your client should have redirect url : 'http://localhost:8089/oauth2callback'

NOTE: if this code is invoked by gradle task(groovy) you task should contain this line: 'standardInput = System.in' or Scanner object will throw exception.

Generate credentials using Google OAuth server for offline apps
OАuthClientConfig config = OАuthClientConfig
       .setClient("::client::")
       .setSecret("::secret::")
       .setScopes(setOf("scope1", "scope2"))
       .setCredentialsStorage(LocalCredentialsFileStorage(filePath))
       .build()
       
GoogleOAuthCredentialsFactory factory = new GoogleOAuthCredentialsFactory(config);
Credentials credentials = factory.getCredentials();

// do some action with credentials

License

Copyright 2017 clouWay ood.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

com.clouway.security

clouWay ood

Версии библиотеки

Версия
0.0.2