Class OAuth20Authorization

    • Method Detail

      • getPKCES256CodeChallenge

        private static java.lang.String getPKCES256CodeChallenge​(java.lang.String cryptographicallyRandomString)
        See RFC7636: PKCE
        Parameters:
        cryptographicallyRandomString - A cryptographically secure string
        Returns:
        The S256 bytes
      • authorize

        public void authorize​(IOAuthParameters parameters,
                              java.util.function.Consumer<java.util.Optional<IOAuthToken>> consumer,
                              java.lang.Enum<?>... scopes)
        Description copied from interface: IOAuthAuthorization
        Perform the authorization dance
        Specified by:
        authorize in interface IOAuthAuthorization
        Parameters:
        parameters - The OAuth parameters
        consumer - The callback for the generated token
        scopes - The scopes to ask for
      • showUrlOpenFailure

        private static void showUrlOpenFailure​(java.lang.String url,
                                               java.lang.String error)
        Show a message if a URL fails to open
        Parameters:
        url - The URL that failed to open
        error - The message indicating why the URL failed to open; if null, no message is shown.