@@ -647,21 +647,33 @@ public static SignatureProvider createWithResourcePrincipal(Logger logger) {
647647 return provider ;
648648 }
649649
650- /*
650+ /**
651+ * Constructor for SignatureProvider given an
652+ * AuthenticationProfileProvider.
653+ * This is for advanced use only; use of the create* methods is preferred.
651654 * The SignatureProvider that generates and caches request signature using
652655 * key id and private key supplied by {@link AuthenticationProfileProvider}.
656+ *
657+ * @param provider The provider to use
653658 */
654- protected SignatureProvider (AuthenticationProfileProvider provider ) {
659+ public SignatureProvider (AuthenticationProfileProvider provider ) {
655660 this (provider , MAX_ENTRY_LIFE_TIME , DEFAULT_REFRESH_AHEAD );
656661 }
657662
658- /*
663+ /**
664+ * Constructor for SignatureProvider given an
665+ * AuthenticationProfileProvider and refresh details.
666+ * This is for advanced use only; use of the create* methods is preferred.
659667 * The constructor that is able to set refresh time before signature
660- * expire, currently this is hidden for simplicity.
668+ * expires.
669+ *
670+ * @param profileProvider The provider to use
671+ * @param durationSeconds amount of time to keep signature before refresh
672+ * @param refreshAheadMs how soon before expiry to start a new refresh
661673 */
662- protected SignatureProvider (AuthenticationProfileProvider profileProvider ,
674+ public SignatureProvider (AuthenticationProfileProvider profileProvider ,
663675 int durationSeconds ,
664- int refreshAhead ) {
676+ int refreshAheadMs ) {
665677 if (profileProvider instanceof RegionProvider ) {
666678 this .region = ((RegionProvider ) profileProvider ).getRegion ();
667679 }
@@ -675,7 +687,7 @@ protected SignatureProvider(AuthenticationProfileProvider profileProvider,
675687 MAX_ENTRY_LIFE_TIME + " seconds" );
676688 }
677689
678- this .refreshAheadMs = refreshAhead ;
690+ this .refreshAheadMs = refreshAheadMs ;
679691 long durationMS = durationSeconds * 1000 ;
680692 if (durationMS > refreshAheadMs ) {
681693 this .refreshIntervalMs = durationMS - refreshAheadMs ;
0 commit comments