Skip to content

Commit

Permalink
2: Update to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Nov 29, 2020
1 parent b95725e commit 9c11896
Show file tree
Hide file tree
Showing 25 changed files with 114 additions and 86 deletions.
2 changes: 1 addition & 1 deletion agorava-core-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>agorava-core-parent</artifactId>
<groupId>org.agorava</groupId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>

<artifactId>agorava-core-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 Agorava
* Copyright 2014-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,18 +30,19 @@
/**
* This qualifier is used to mark Class to indicate that it should be used to generate different beans for each {@link
* ProviderRelated} Qualifier.
* <p/>
* <br>
* Provider services (i.e. Social Media) are dynamically discovered when Agorava is bootstrapped thanks to Provider services
* qualifiers
* defined in each module and bearing the {@link ProviderRelated} annotation.
* <p/>
* <br>
* Bootstrap process retrieve Generic Beans (thanks to this qualifier) and produces qualified versions with {@link
* ProviderRelated} qualifiers discovered previously.
* <p/>
* <br>
* The bootstrapping process will analyse generic beans to replace {@link InjectWithQualifier} annotation by injection with Bean
* qualifier
*
* @author Antoine Sabot-Durand
* @author Werner Keil
* @see ProviderRelated
* @see InjectWithQualifier
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 Agorava
* Copyright 2016-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,9 +27,9 @@
* <p>This is a <a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html#package.description">functional interface</a>
* whose functional method is {@link #getId()}.
*
* @author Werner KEIL
* @version 0.4 $Date: 2016/01/04 $
* @see {@link Identifiable}
* @author Werner Keil
* @version 1.0 $Date: 2020/11/29 $
* @see Identifiable
*/
public interface IntIdentifiable extends Serializable {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 Agorava
* Copyright 2016-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,9 +24,9 @@
* <p>This is a <a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html#package.description">functional interface</a>
* whose functional method is {@link #getId()}.
*
* @author Werner KEIL
* @version 1.0.0 $Date: 2016/03/04 $
* @see {@link Identifiable}
* @author Werner Keil
* @version 1.1 $Date: 2020/11/29 $
* @see Identifiable
*/
public interface LongIdentifiable {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Agorava
* Copyright 2013-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,11 +21,12 @@
/**
* Builder for an {@link OAuthAppSettings} can be initialized directly from
* fields name or from an Array of {@link Param} in case of Annotation configuration with {@link OAuthApplication}.
* <p/>
* <p>
* For this last purpose, the interface {@link OAuthAppSettingsBuilder} contains constants
* for fields name should the configuration being read from a text file.
*
* @author Antoine Sabot-Durand
* @author Werner Keil
*/
public interface OAuthAppSettingsBuilder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public interface HttpParameters {

/**
* @return the parameter list converted in OAuth 1.0a base string (the string to sign)
* @see <a href="http://oauth.net/core/1.0/#anchor14">the oauth spec</a> for more info on this.
* @see <a href="https://oauth.net/core/1.0/#anchor14">the Oauth spec</a> for more info.
*/
String asOauthBaseString();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Agorava
* Copyright 2013-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,6 +31,7 @@
* Qualifier to distinguish different {@link org.agorava.api.service.SignatureService} implementations
*
* @author Antoine Sabot-Durand
* @author Werner Keil
*/
@Qualifier
@Target({TYPE, METHOD, PARAMETER, FIELD})
Expand Down Expand Up @@ -63,7 +64,7 @@ enum Type {
/**
* For signature based on RSA-SHA1
*
* @see <a href=http://www.w3.org/PICS/DSig/RSA-SHA1_1_0.html">w3c documentation on RSA SHA1</a>
* @see <a href="http://www.w3.org/PICS/DSig/RSA-SHA1_1_0.html">w3c documentation on RSA SHA1</a>
*/
RSASHA1,

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Agorava
* Copyright 2013-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,11 +18,12 @@

/**
* Unix epoch timestamp generator.
* <p/>
* <p>
* This class is useful for stubbing in tests.
*
* @author Pablo Fernandez
* @author Antoine Sabot-Durand
* @author Werner Keil
*/
public interface TimestampService {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

/**
* Abstract base class for all Provider high level REST API calls.
* <p/>
* <p>
* Concrete class must implement some or API of the remote service
*
* @author Antoine Sabot-Durand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@

/**
* Default Provider configuration implementing the OAuth protocol, version 1.0a
* <p/>
* <p>
* This class is meant to be extended by concrete implementations of the Provider configuration,
* providing the endpoints and endpoint-http-verbs.
* <p/>
* <p>
* If your Api adheres to the 1.0a protocol correctly, you just need to extend
* this class and define the getters for your endpoints.
* <p/>
* <p>
* If your Api does something a bit different, you can override the different
* extractors or services, in order to fine-tune the process.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@

/**
* Default Provider configuration implementing the OAuth protocol, version 2.0 (draft 11)
* <p/>
* <p>
* This class is meant to be extended by concrete implementations of the API,
* providing the endpoints and endpoint-http-verbs.
* <p/>
* <p>
* If your Api adheres to the 2.0 (draft 11) protocol correctly, you just need to extend
* this class and define the getters for your endpoints.
* <p/>
* <p>
* If your Api does something a bit different, you can override the different
* extractors or services, in order to fine-tune the process.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@

/**
* Default Provider configuration implementing the OAuth protocol, version 2.0 final
* <p/>
* <p>
* This class is meant to be extended by concrete implementations of the API,
* providing the endpoints and endpoint-http-verbs.
* <p/>
* <p>
* If your Api adheres to the 2.0 final protocol correctly, you just need to extend
* this class and define the getters for your endpoints.
* <p/>
* <p>
* If your Api does something a bit different, you can override the different
* extractors or services, in order to fine-tune the process.
*
Expand Down
4 changes: 2 additions & 2 deletions agorava-core-impl-cdi/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Copyright 2014-2019 Agorava
~ Copyright 2014-2020 Agorava
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@
<parent>
<artifactId>agorava-core-parent</artifactId>
<groupId>org.agorava</groupId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>

<artifactId>agorava-core-impl-cdi</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion agorava-core-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>agorava-core-parent</artifactId>
<groupId>org.agorava</groupId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 Agorava
* Copyright 2016-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,7 @@
import java.util.logging.Logger;

/**
* OAuth 1.0a implementation of {@link org.agorava.api.oauth.OAuthProvider}
* OAuth 1.0a implementation of {@code org.agorava.api.oauth.OAuthProvider}
*
* @author Antoine Sabot-Durand
* @author Pablo Fernandez
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Agorava
* Copyright 2013-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,11 +29,13 @@
import static org.agorava.api.extractor.ExtractorType.Type.TOKEN_STD;

/**
* Default implementation of {@RequestTokenExtractor} and {@AccessTokenExtractor}. Conforms to OAuth 1.0a
* <p/>
* Default implementation of {@code TokenExtractor}. Conforms to OAuth 1.0a
* <p>
* The process for extracting access and request tokens is similar so this class can do both things.
*
* @author Pablo Fernandez
* @author Werner Keil
* @see TokenExtractor
*/
@ExtractorType(TOKEN_STD)
public class TokenExtractor10 implements TokenExtractor {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Agorava
* Copyright 2013-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,7 +29,9 @@
import static org.agorava.api.oauth.OAuth.OAuthVersion.TWO_DRAFT_11;

/**
* Default implementation of {@AccessTokenExtractor}. Conforms to OAuth 2.0
* Default implementation of {@code TokenExtractor}. Conforms to OAuth 2.0
* @see TokenExtractor
* @author Werner Keil
*/
@OAuth(TWO_DRAFT_11)
public class TokenExtractor20 implements TokenExtractor {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Agorava
* Copyright 2013-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,10 +29,12 @@
import static org.agorava.api.service.SignatureType.Type.HMACSHA1;

/**
* HMAC-SHA1 implementation of {@SignatureService}
* HMAC-SHA1 implementation of {@code SignatureService}
*
* @author Pablo Fernandez
* @author Antoine Sabot-Durand
* @author Werner Keil
* @see SignatureService
*/

@SignatureType(HMACSHA1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Agorava
* Copyright 2013-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,10 +25,12 @@
import static org.agorava.api.service.SignatureType.Type.PLAINTEXT;

/**
* plaintext implementation of {@SignatureService}
* plaintext implementation of {@code SignatureService}
*
* @author Pablo Fernandez
* @author Antoine Sabot-Durand
* @author Werner Keil
* @see SignatureService
*/

@SignatureType(PLAINTEXT)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 Agorava
* Copyright 2013-2020 Agorava
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,6 +28,8 @@

/**
* A signature service that uses the RSA-SHA1 algorithm.
* @author Werner Keil
* @see SignatureService
*/
@SignatureType(RSASHA1)
public class RSASha1SignatureService implements SignatureService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* <li>callback</li>
* <li>scope</li>
* </ul>
* <p/>
* <p>
* You can configure a prefix for the key with {@link #prefix(String)}. By default the prefix is empty
*
* @author Antoine Sabot-Durand
Expand Down Expand Up @@ -100,12 +100,12 @@ public static ResourceBundle retrievePropertyBundle(String bundleName) {
}

/**
* {@inheritDoc} <p/>
* {@inheritDoc} <p>
* This implementation will build the {@link OAuthAppSettings} from a {@link ResourceBundle}
* <p/>
* <p>
* It'll first try to load all binding (mandatory) fields from the bundle by looking for the key prefix.fieldName (or
* fieldName if prefix is empty)
* <p/>
* <p>
* In a second time it'll check if optional fields are present in the bundle (with the same key construction) and load
* them if they are.
* If they are not present it'll try to load them without prefix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

/**
* The representation of an OAuth HttpRequest.
* <p/>
* <p>
* Adds OAuth-related functionality to the {@link RequestImpl}
*
* @author Pablo Fernandez
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void shouldReturnSignature() {

/**
* Created primary key using openssl.
* <p/>
* <p>
* openssl req -x509 -nodes -days 365 -newkey rsa:1024 -sha1 -subj '/C=GB/ST=/L=Manchester/CN=www.example.com' -keyout
* myrsakey.pem -out /tmp/myrsacert.pem
* openssl pkcs8 -in myrsakey.pem -topk8 -nocrypt -out myrsakey.pk8
Expand Down
Loading

0 comments on commit 9c11896

Please sign in to comment.