oauth

How to set OAuth realm in RestAssured

与世无争的帅哥 提交于 2020-07-22 08:53:32
问题 I am using RestAssured library for automating NetSuite Restlets. This Restlets are using OAuth 1.0 for authentication. Apart from consumer key, consumer secret, access token and token secret, I need to set advanced fields like REALM. But I couldn't find any way to set that in RestAssured. RequestSpecification request = new RequestSpecBuilder() .addHeader("Content-Type", ContentType.JSON.toString()) .setBaseUri(url).build() .auth().oauth( netsuiteConfig.getNetsuiteConsumerKey(), netsuiteConfig

How to get info from script.google.com web page with Java?

夙愿已清 提交于 2020-07-10 10:28:38
问题 So, I have my script page and I want to get output that generates on this page. It could've been done with default http client but the problem is that google requires authorization to access this page. So how can I do it right? I also asked about this before but now I realize that my question wasn't clear. 回答1: It is possible to post web app page to be accessible by "anyone even anonymous". So no auth is needed 来源: https://stackoverflow.com/questions/62533751/how-to-get-info-from-script

How to get info from script.google.com web page with Java?

China☆狼群 提交于 2020-07-10 10:28:00
问题 So, I have my script page and I want to get output that generates on this page. It could've been done with default http client but the problem is that google requires authorization to access this page. So how can I do it right? I also asked about this before but now I realize that my question wasn't clear. 回答1: It is possible to post web app page to be accessible by "anyone even anonymous". So no auth is needed 来源: https://stackoverflow.com/questions/62533751/how-to-get-info-from-script

http security config for tls and Oauth2 in the same method

社会主义新天地 提交于 2020-07-10 03:12:54
问题 I want to make a config file to configure TLS and Oauth2 in my SecureConfig.java The tls config: @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().anyRequest().authenticated().and().sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.NEVER); } The Oauth2.0 config: @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable() .requiresChannel() .anyRequest() .requiresSecure(); } What is the better way

http security config for tls and Oauth2 in the same method

我的未来我决定 提交于 2020-07-10 03:12:52
问题 I want to make a config file to configure TLS and Oauth2 in my SecureConfig.java The tls config: @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().anyRequest().authenticated().and().sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.NEVER); } The Oauth2.0 config: @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable() .requiresChannel() .anyRequest() .requiresSecure(); } What is the better way

using oauth in laravel gives Error: redirect_uri_mismatch

耗尽温柔 提交于 2020-07-09 20:58:08
问题 i want to add google oauth to my laravel project using socialite package. i create a project in google developer console with address http://lvh.me which is localhost. and for callback url i add this: http://lvh.me:8000/login/google/callback and i added the routes and functions to my project and authController. now when i hit the address http:lvh.me:8000/login/google it returns for me the error: Error: redirect_uri_mismatch The redirect URI in the request, https://lvh.me:8000/login/google

Script fails on SpreadsheetApp.openById - Requires permission

让人想犯罪 __ 提交于 2020-07-09 08:54:12
问题 I have an onOpen function that creates a custom menu in a spreadsheet. It's been working fine for over a year, but a couple days ago it stopped working. When I look at the execution transcript I get: "Execution failed: You do not have permission to call SpreadsheetApp.openById. Required permissions: https://www.googleapis.com/auth/spreadsheets" This fails/relates to the below line of code: var ss = SpreadsheetApp.openById("myID") I've checked what API's are enabled, and I have Sheets enabled,

PHP Oauth gets 401 on PHP 7.3, ok on PHP 7.2 and earlier

与世无争的帅哥 提交于 2020-07-07 11:28:31
问题 I'm trying to use PHP's Oauth module to interact with Etsy's API. Following Etsy's docs, I have <?php if (!extension_loaded('oauth')) { throw new Exception('Oauth not loaded.'); } $oauth = new OAuth("foobar-key", "foobar-secret"); $req_token = $oauth->getRequestToken( "https://openapi.etsy.com/v2/oauth/request_token?scope=email_r%20listings_r", "oob", "GET" ); This works fine when run with php7.2: php7.2 etsy-oauth.php ... OK When the same is run with php7.3, though, I get a 401: php7.3 etsy

OAuth1.0 header in Node.js

£可爱£侵袭症+ 提交于 2020-07-06 22:56:49
问题 I've been using an API via postman that uses OAuth1.0, successfully. Now I'm building an API that calls this API but I'm having trouble when trying to set up the equivalent in javascript of the OAuth1.0. The header looks like this: 'Authorization': 'OAuth oauth_consumer_key="XXX",oauth_token="XXX",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1559312415",oauth_nonce="XXX",oauth_version="1.0",oauth_signature="XXX"' My problem is related to oauth_nonce and oauth_signature . What are the

When is access_type = Online appropriate? :OAuth2 - Google API

ぃ、小莉子 提交于 2020-07-04 12:13:10
问题 When requesting OAuth credentials, I can specify the access_type to be Offline or Online. Opting for the Online access type forces the users to approve access to my app each time they login. Why is that? Hasn't the user already approved my app? Update #1: I have my approval_prompt set to 'auto'. If I just log out of Google without deleting any cookies, it doesn't prompt me again. But deleting the cookies brings back the grant screen. Update #2: It works fine through the OAuth Playground. http