Questions tagged [token]

1

votes
2

answer
1.1k

Views

when Task.IsCancelled is set as true?

when will come Task.IsCanceled = true; Code: var cts = new CancellationTokenSource(); string result = ''; cts.CancelAfter(10000); try { Task t = Task.Run(() => { using (var stream = new WebClient().OpenRead('http://www.rediffmail.com')) { result = 'success!'; } cts.Token.ThrowIfCancellationRequested...
Gokul Kumar
0

votes
0

answer
3

Views

How to get current session token in RSA Archer?

I'm working with RSA Archer GRC 6.1 and trying to create an iView block with custom content. It's supposed to show results of an 'ExecuteSearch' request using JavaScript. To do that I need to get a current session token, but I can't find the solution. 'CreateUserSession' and other methods, described...
Alexander
1

votes
2

answer
55

Views

What is the sense of the CSRF Token protection?

I have read a lot about this and I still don't understand it. Let's say I have a domain with a form available only for authenticated users to post comments on some kind of content: my_form.php
BanNsS1
1

votes
1

answer
583

Views

Bearer token failure MockMvc test Java Spring Boot

I'm failing to understand why this does not work. I'm assuming it's something simple that I'm overlooking. All other other test methods not utilizing a token work fine. There is no expiration currently on the token, and I can use it fine with Postman. @Test public void getUser() throws Exception {...
Leo Williams
1

votes
0

answer
772

Views

Read Certificate from USB token in javascript

I want to read certificate from Digital Signature (USB token) in Javascript, i need both public and private key... ? Any help would be appreciated....
mayur saini
1

votes
1

answer
533

Views

Connecting API with laravel project

I need to connect to an API with my Laravel 5.1 project so I write function to test: public function testDng() { $client = new GuzzleHttp\Client(['verify' => false ]); try { $res = $client->post('https://api.example.com/api/authenticate', [ 'form_params' => [ 'email' => '[email protected]', 'password...
Aleks Per
1

votes
0

answer
139

Views

Azure Notification Hub - Invalid authorization token signature with Java

Hi all I'm trying to send a notification with Azure Notification Hub in Java. This is the code I used: NotificationHub hub = new NotificationHub('Endpoint=sb://XXXXXXXXXX;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=XXXXXXXXXXXXXXXXX', 'myHubName');...
MicheleP
1

votes
1

answer
196

Views

Devise reset password email points to the wrong controller

I included devise_token_auth to login from a webapp hosted elsewhere. But I'd like also to be able to sign in directly into my rails app. My routes.rb looks like this: #... devise_for :users namespace :api, defaults: {format: :json} do mount_devise_token_auth_for 'User', at: 'auth' #... To reset the...
Baleato
1

votes
0

answer
172

Views

Unable to generate new Token using adalService.acquireToken for Logged in user to consume Microsoft Graph API

trying to generate new token using adalService.acquireToken() for accessing logged-in user details from Microsoft Graph API. below written code is not generating a Token, Error: 'error in acquiring token Token renewal operation failed due to timeout' OR 'Invalid Token' Here is What I have tried: onG...
Tarun Rathore
1

votes
0

answer
82

Views

how can i use TYPE_INPUT_METHOD, TYPE_WALLPAPER to create a view?

When I use these 2 types to create an Android view, I get the Bad token Error, but it won't happen when I use type like TYPE_SYSTEM_ALERT, TYPE_TOAST. I know there is a token checking mechanism when I want to add view to the WMS. So I don't want to see any source code about this error. I just want t...
hitwhyyx
1

votes
0

answer
505

Views

Keycloak logout not working for “bearer-only” application exposing REST services

I am unable to logout an user. The logout works for a 'confidential' applications but it doesn't for a 'bearer-only' application (the REST services are still accessible after logout). I have the following configuration: I have one 'database' client application defined in Keycloak having access type...
Dan Nemes
1

votes
0

answer
432

Views

IdentityServer, how to validate token using multiple authorities

How can I use IdentityServer.accesstokenvalidation package to validate tokens using multiple authorities? In my front end application I am getting a token using let us say on of the following: 1- subdomain1.identityserver.com 2- subdomain2.identityserver.com 3- subdomain3.identityserver.com Now if I...
Yahya Hussein
1

votes
1

answer
273

Views

How to resolve Multi Factor authentication for AAD in Selenium test in CI

I am trying to integrate Selenium tests to CI. The problem I am facing is all the users (even test user) is protected by Multi-factor authentication and when I will run test cases on the server with each login there will a prompt user for the Multi factor. We are running selenium test cases on SPA u...
Ramesh Chandra
1

votes
1

answer
28

Views

implementing other grants when only authorization code is available

I am creating web and mobile apps that reimplement an existing desktop app via the desktop apps publicly available API. This API only provides the Authorization Code Grant path for authentication, which would require me to either: somehow securely store the client secret in the app Implement PKCE &...
Somkun
1

votes
0

answer
59

Views

Racket, ragg: doesn't accept token stream

Using #lang ragg in Racket to create a parser for a simple language. Here is the grammar: #lang ragg program : sexpr* start* layout sexpr : SEXPR start : WORD WORD '[' WORD* '=' '>' sexpr ']' layout : elem* elem : info | text | sexpr info : '{' text '}' text : WORD* And here are the fi...
Ploppz
1

votes
1

answer
521

Views

Owin/Katana UseJwtBearerAuthentication Always Returns 401

I need to implement JWT Bearer Authentication in both a .NET 4.6.1 Web API project, as well as a .NET Core 2.0 web project. I successfully got the core project up and running with the this sample from Microsoft. I'm following this sample from Scott Allen for the .NET 4.6.1 project. My 4.6.1 code lo...
Tim_Cardwell
1

votes
1

answer
130

Views

Store global token in Cache

I have a module which in the AuthorizationServiceEventHandler Checking or Complete Events i'm sending a request to an external API which gives me some instructions like what modules should be enabled/displayed to the user . The appraoch i want to follow is storing this instructions somewhere probab...
buff
1

votes
0

answer
121

Views

How to refresh and obtain a non-expired auth token within a recursive ajax call

My concern comes with 2 main questions: I'm following the tutorial to integrate the 'Google Sign-In into my web app'. I have a working web application with a google id_token. After 1 hour, the error says the token is expiring, as shown below: File '...\flask\app.py', line 1612, in full_dispatch_requ...
BeerIsGood
1

votes
0

answer
276

Views

Laravel 5.5 post request error

I'm working on the project using Laravel 5.5. I have resource controller and trying to save data in store method. The route looks like this: Route::resource('post', 'Post\PostController'); This is Store method in the controller: public function store(Request $request) { dd($request); } And also I ha...
LTM
1

votes
0

answer
4.4k

Views

Spring Boot Keycloak- Bearer-only - for backend service not working

I am trying to secure my rest api and frontend using Keycloak. Frontend is based on Angular 4. Backend is rest api built using Spring boot. I have created two client in keycloak admin console,in same realm(testRealm). front-end client's ACCESS-TYPE is 'Public'. Backend client(backendService) ACCESS-...
Mahesh_Loya
1

votes
1

answer
1.3k

Views

How to configure HttpSecurity for this situation (Spring Boot)

Criteria: Unauthenticated users request token from /oauth/token Unauthenticated users can also access swagger docs at /swagger-ui.html All other endpoints should be secured i.e. require a valid token to use. What I've Tried: SecurityConfig.java - Possibly the source of the problem @Configuration @En...
Jordan Mackie
1

votes
1

answer
597

Views

adding custom claims to identity server 4 GrantValidationResult

As per http://docs.identityserver.io/en/release/reference/grant_validation_result.html I'm trying to add extra claims to a GrantValidationResult but the extra claims arent showing up just wondering where i could be going wrong here: var extraClaims = new List { new Claim('resource_id', resourceId)...
David Parsonson
1

votes
1

answer
294

Views

Retrofit - HTTP FAILED: java.lang.IllegalStateException: closed when I try to refresh token

I need to refresh token via Retrofit API. I want to do it in Interceptor. But when I run app, it's can't finish request. It returns HTTP FAILED: java.lang.IllegalStateException: closed. I have researched a lot of information, but I can't find solution. My RestClient public class RestClient { /* Sing...
1

votes
1

answer
1.4k

Views

How to refresh personal access token programmatically in Laravel?

I have used createToken method on User model to create personal access token. Now I want to refresh that token in code without http request to oauth/token/refresh. How could I do that?
Ali Farhoudi
1

votes
1

answer
1k

Views

laravel login through API using token

I'm using laravel 5.4 to develop an api When trying to login using API Controller Route::post('/login','Auth\[email protected]') class ApiLoginController extends Controller { public function login(Request $request) { $this->validate($request,[ 'email' => 'required|email', 'password' => 'requi...
Ayush Agrawal
1

votes
1

answer
1.3k

Views

oauth2 auto refresh token

I have a spring boot controller, that invokes a service on wso2. (sends an identity and receives a token for further communication). I am looking for a way to auto-refresh the token on the spring boot side (because the invocation of the service on wso2 is not done by a browser, but rather by another...
ReggieK123
1

votes
1

answer
349

Views

ERC 223 Token Standard is not Working

I am trying to create a new tokens using ERC223 standard. The tokens are created but when i am trying to transfer tokens to other wallet, the transaction hash is created and the transaction has failed. The tokens are deducted from my wallet and not added to destination wallet. This is my transaction...
Kishore
1

votes
0

answer
280

Views

CSV Empty Column Handling - Fast CSV npm

I have a CSV with 5 columns, few of which might be empty for some records. For example, lets say Here, Subject and Marks are empty for Rib. In this case, iff I try to parse the CSV file using npm module fast-csv, it throws an error ... Rib,3,,, SyntaxError: Unexpected token , Code Snippet : 'use s...
Prerna Jain
1

votes
0

answer
125

Views

How to configure WSO2 Api Manager to provide JWT as access token?

Is there a way to provide JWT instead of what's by default, because I need to see the information about roles, permissions and other things inside it?
nmrlqa4
1

votes
0

answer
604

Views

nginx authentication from external service

My goal is to enable access on one (static) web page/folder only to authenticated users. auth_basic is NOT option. There are 2 servers: nginx (contains http,css and javascript) and REST server (doing authentication and provides secure content). REST server provides access token. On www.somesite.com...
ivan
1

votes
0

answer
130

Views

using google api refresh_token

We have a mobile based application, where mobile ask user the offline access to google drive. Google give the credentials to mobile from where it is passed to the server via API. Server access users google drive. Mainly include file manipulation according to his or his contacts actions(So the user...
alrarea
1

votes
0

answer
239

Views

wso2 api manager refresh and access token revocation

I have the setup where clients are accessing APIs defined through WSO2 API Manager secured by OAuth2 refresh and access tokens. The client gets the tokens using authorization code flow and authentication and authorization is done by 3rd party software. Access tokens has default expiration time of 36...
user1563721
1

votes
0

answer
22

Views

Server Oauth 2.0 with Android application

I have a server oauth 2.0 and I would like connect my android application (Java android) with my server to get access token and use the services of my API. I think that I must use AccountManager ? I looked at this site: http://blog.udinic.com/2013/04/24/write-your-own-android-authenticator/
Canitie
1

votes
1

answer
159

Views

Web API and Attribute routing

I am new in web api and attribute routing. just read a article from here. http://www.binaryintellect.net/articles/a2bf5c05-18a6-44b3-9f73-5896b40f0dff.aspx see their attribute routing for web api action [Route('api/[controller]/Logout')] [HttpPost] public IActionResult Logout() { HttpContext.SignOut...
Mist
1

votes
2

answer
128

Views

MethodNotAllowedHttpException path without CSRF

I pass a route in laravel which is called by a function in JS and I have no control of it because it is external, this route is a post method since I need it to be that way but it generates me a MethodNotAllowedHttpException as I do to exclude certain routes of this validation. Note: I have already...
Mhurtado
1

votes
0

answer
172

Views

Setting Authorization Bearer using Asynctask?

I am getting file not found exception with 405 status code when I try to pass Authorization Bearer using Asynctask and if I comment the line passing Authorization Bearer I am getting 403 with status code. below is my code. class getloantypes extends AsyncTask{ private String LOANURL= 'http://185.78...
Sunil P
1

votes
1

answer
50

Views

Conflict Update Model (Rails)

My first question is not really specific to rails, but more general about good practices. Let's suppose that I have an API with only one Model : Post. And few records of it. A first client who modify a specific Post record but doesn't have services to call the API. So he will store the modifications...
Alexis Darnat
1

votes
0

answer
71

Views

how do i generate access token for listing all collaborators of a github api using python script

Below is my python script to print all the collaborators of a Github repository. I am getting a Response 403 error. I don't know which token should i use here. Is it the personal token, OAuth token. Can someone please guide me how to generate a access token here? # coding: utf-8 import requests impo...
Dookoto_Sea
1

votes
1

answer
231

Views

MVC to WebAPI- httpclient

I have MVC App and webapi and both are in different projects and mvc app authenticates via webapi using token authentication. I can authenticate via webapi and get the bearer token in MVC.But when i pass the bearer token to webapi and access resources which are protected by authorize keyword , it...
user1570697
1

votes
0

answer
38

Views

Golang Translations with search

I have a package which is reusable but also needs translations. For the first binary that uses it, all is well - for the second one I may forget some tokens that need translations. Subsequentially this leads to texts not being translated. Therefore I am looking for a way to have translations, that e...
user2089648

View additional questions