Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion copyright.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright notice

Version 5.0, October 2024

Copyright 2005-2024 Qlik
Copyright 2005-2026 Qlik

The contents of this open source project are subject to the terms of the Apache 2.0 open
source license available at http://www.opensource.org/licenses/apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion mvnw

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions mvnw.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/**
* Copyright 2005-2024 Qlik
*
* The contents of this file is subject to the terms of the Apache 2.0 open
* source license available at http://www.opensource.org/licenses/apache-2.0
*
* Copyright 2005-2026 Qlik
*<p>
* The content of this file is subject to the terms of the Apache 2.0 open
* source license available at https://www.opensource.org/licenses/apache-2.0
*<p>
* Restlet is a registered trademark of QlikTech International AB.
*/

package org.restlet.ext.crypto;

import org.restlet.Context;
Expand All @@ -18,58 +17,47 @@

/**
* Authenticator supporting the {@link ChallengeScheme#HTTP_AWS_S3} scheme.
*
*
* @author Jean-Philippe Steinmetz <caskater47@gmail.com>
*/
public class AwsAuthenticator extends ChallengeAuthenticator {
/**
* Creates a new HttpAwsS3Authenticator instance.
*
* @param context
* The context
* @param optional
* Indicates if the authentication success is optional
* @param realm
* The authentication realm
*
* @param context The context
* @param optional Indicates if the authentication success is optional
* @param realm The authentication realm
*/
public AwsAuthenticator(Context context, boolean optional, String realm) {
this(context, optional, realm, new AwsVerifier(null));
}

/**
* Creates a new HttpAwsS3Authenticator instance.
*
* @param context
* The context
* @param optional
* Indicates if the authentication success is optional
* @param realm
* The authentication realm
*
* @param context The context
* @param optional Indicates if the authentication success is optional
* @param realm The authentication realm
* @param verifier
*/
public AwsAuthenticator(Context context, boolean optional, String realm,
Verifier verifier) {
public AwsAuthenticator(Context context, boolean optional, String realm, Verifier verifier) {
super(context, optional, ChallengeScheme.HTTP_AWS_S3, realm, verifier);
}

/**
* Creates a new HttpAwsS3Authenticator instance.
*
* @param context
* The context
* @param realm
* The authentication realm
*
* @param context The context
* @param realm The authentication realm
*/
public AwsAuthenticator(Context context, String realm) {
this(context, false, realm);
}

/**
* Returns the maximum age of a request, in milliseconds, before it is
* considered stale.
* <p>
* A negative or zero value indicates no age restriction. The default value
* is 15 minutes.
* Returns the maximum age of a request, in milliseconds, before it is considered stale.
*
* <p>A negative or zero value indicates no age restriction. The default value is 15 minutes.
*/
public long getMaxRequestAge() {
return getVerifier().getMaxRequestAge();
Expand All @@ -81,45 +69,40 @@ public AwsVerifier getVerifier() {
}

/**
* Returns the secret verifier that will be wrapped by the real verifier
* supporting all the HTTP AWS verifications.
*
* Returns the secret verifier that will be wrapped by the real verifier supporting all the HTTP
* AWS verifications.
*
* @return the local wrapped verifier
*/
public LocalVerifier getWrappedVerifier() {
return getVerifier().getWrappedVerifier();
}

/**
* Sets the maximum age of a request, in milliseconds, before it is
* considered stale.
* <p>
* A negative or zero value indicates no age restriction. The default value
* is 15 minutes.
* Sets the maximum age of a request, in milliseconds, before it is considered stale.
*
* <p>A negative or zero value indicates no age restriction. The default value is 15 minutes.
*/
public void setMaxRequestAge(long value) {
getVerifier().setMaxRequestAge(value);
}

/**
* Sets the internal verifier. In general you shouldn't replace it but
* instead set the {@code wrappedVerifier} via the
* {@link #setWrappedVerifier(LocalVerifier)} method.
* Sets the internal verifier. In general, you shouldn't replace it but instead set the {@code
* wrappedVerifier} via the {@link #setWrappedVerifier(LocalVerifier)} method.
*/
@Override
public void setVerifier(Verifier verifier) {
if (!(verifier instanceof AwsVerifier))
throw new IllegalArgumentException();
if (!(verifier instanceof AwsVerifier)) throw new IllegalArgumentException();

super.setVerifier(verifier);
}

/**
* Sets the secret verifier that will be wrapped by the real verifier
* supporting all the HTTP AWS verifications.
*
* @param verifier
* The local verifier to wrap
* Sets the secret verifier that will be wrapped by the real verifier supporting all the HTTP
* AWS verifications.
*
* @param verifier The local verifier to wrap
*/
public void setWrappedVerifier(LocalVerifier verifier) {
getVerifier().setWrappedVerifier(verifier);
Expand Down
Loading
Loading