POST
|
hello. i am using POST method to generate token. You can increase expiration value while generating token. var tokenvalue = $.ajax({
type: "POST",
url: generatetoken, //address of arcgis server or portal
data: {
username: username,
password: password,
client: "referer&requestip",
referer: locationaddress,
expiration: '60',
f: "json"
},
dataType: "json"
}).done(function (response) {.... for IdentityManager you can try this; const userInfo = {
username: username,
password: password,
client: "referer",
referer: locationaddress,
expiration: 60
};
IdentityManager.generateToken(serverInfo, userInfo).then(function (response){....
... View more
03-20-2024
06:03 AM
|
0
|
0
|
41
|
POST
|
I think there is no progress on the issue. i could not find any solution. I create a token externally and do everything without opening the experience application, but the identity manager login screen appears again. I think we need to pass this login information to the map widget section in experience builder. but how?
... View more
03-20-2024
05:51 AM
|
0
|
0
|
127
|
POST
|
Thank you for the answer. In both scenarios for 3.X and 4.X API, I try to use token-Based Authentication services. There is no problem with the server in a valid token. Because when I add the token value I supplied to the end of the relevant web service, I can reach the service. In the following stages, esriId.registerToken method and the Credential and Serverinfo values produced for 3.x Api are different from what I produce using 4.x Api. (I mentioned it in my first message.) 3. x Api use; When the application is opened, the "Code: 499, Message:" Token Required "error for the encrypted service layer after the esriId.initialize process. Immediately afterwards, it adds the token value to the service address and opens the map. However, in the application that uses 4.28 API, the "Code: 499, Message:" Token Requirered "error is not carried out after the error. What should be the values of serverinfo and credentals to the initialized content for 4.28 api? Thanks
... View more
01-11-2024
05:51 AM
|
0
|
1
|
396
|
POST
|
Hello. I am having trouble bypassing the identity manager login screen in Arcgis Maps SDK for JavaScript 4.28 version. To summarize; In Arcgis js api 3.x versions, I could view an encrypted rest service on the arcgis server thanks to the token value I obtained. (For applications created by arcgis web app builder developer edition) For this process, I obtain tokens using the POST method on the Arcgis server with the user information I obtained from the custom login screen, and then use the esriId.registerToken function and save the login information in json format into local storage. When directed back to the application, I can use the credentials and serverInfos information in the local storage and bypass the identitymanager login screen with the esriId.initialize function. (Reference: https://developers.arcgis.com/javascript/3/jssamples/widget_identitymanager_client_side.html) Get Token var tokenvalue = $.ajax({
type: "POST",
url: generatetokenaddress,
data: {
username: username,
password: password,
client: "referer&requestip",
referer: locationaddress,
expiration: '60',
f: "json"
},
dataType: "json"
}).done(function (response) Register Token if (response.token) {
IdentityManager.registerToken({
server: restserviceaddresss,
token: response.token,
expires: response.expires,
ssl: false,
userId: username
});
}; Set Local Storage if (response.token !== undefined) {
var idString = JSON.stringify(IdentityManager.toJson());
if (supports_local_storage()) {
window.localStorage.setItem(cred, idString); Example of data in local storage for 3.x: {
"serverInfos": [
{
"server": "https://domain/arcgis",
"tokenServiceUrl": {
"promise": {},
"_pendingDfd": {
"promise": {},
"ioArgs": {
"args": {
"url": "https://domain/arcgis/rest/info",
"content": {
"f": "json"
},
"handleAs": "json",
"callbackParamName": "callback",
"timeout": 60000
},
"url": "https://domain/arcgis/rest/info?f=json",
"query": null,
"handleAs": "json",
"xhr": {}
}
},
"adminUrl_": "https://domain/arcgis/admin/generateToken"
},
"hasPortal": true
}
],
"oAuthInfos": [],
"credentials": [
{
"userId": "username",
"server": "https://domain/arcgis",
"token": "tokenvalue",
"expires": 1704892574229,
"ssl": false,
"creationTime": 1704888975210,
"scope": "server",
"resources": [
"https://domain/arcgis/rest/services/"
]
}
]
} When I want to use the same scenario with the web application produced with Experience Builder Developer Edition, although it initializes the json data shown below and no error message occurs, the identity manager login screen is not bypassed and asks for user login again. Get Token and register token codes are same like 3.x but configured for 4.28. 4.28 created credential json data in local storage for esriid.initialize: {
"serverInfos": [
{
"adminTokenServiceUrl": "https://domain/arcgis/admin/generateToken",
"currentVersion": "10.7",
"hasPortal": false,
"server": "https://domain/arcgis",
"shortLivedTokenValidity": 60,
"tokenServiceUrl": "https://domain/arcgis/tokens/",
"webTierAuth": true
}
],
"oAuthInfos": [],
"credentials": [
{
"userId": "username",
"server": "https://domain/arcgis",
"token": "tokenvalue",
"expires": 1704892922005,
"ssl": false,
"creationTime": 1704889323452,
"scope": "server",
"resources": [
"https://domain/arcgis/rest/services/"
]
}
]
} Thanks in advance for your help. Server and portal info: Arcgis Enterprise Server 10.7 (not federated and active directory connection available for user management) Arcgis Enterprise Portal 10.7 for web map. (the web map used is publicly available)
... View more
01-10-2024
04:28 AM
|
0
|
4
|
519
|
POST
|
By modifying init.js i succesfully generate token and register it. Only i must modify a login screen while web app loads. İ am trying to put a user logon on web app index.html, but unsuccesfull for now. const loginForm = document.getElementById("login-form");
const loginButton = document.getElementById("login-form-submit");
const loginErrorMsg = document.getElementById("login-error-msg");
loginButton.addEventListener("click", (e) => {e.preventDefault();
const username = loginForm.username.value;
const password = loginForm.password.value;
require(["esri/IdentityManager","dojo/domReady!"], function(IdentityManager) {
if (loginForm.username.value.includes("domainprefix\\")) {
var username = (loginForm.username.value);
} else {var username = ("domainprefix\\" + loginForm.username.value);};
var password = loginForm.password.value;
var tokenvalue = $.ajax({
type: "POST",
url: "https://domain/arcgis/tokens/generateToken",
data: {
username: username,
password: password,
client: "requestip",
expiration: '60',
f: "json"
},
dataType: "json"
});
if (tokenvalue) {
tokenvalue
.success(function (response){
if (response.token) {
IdentityManager.registerToken({
server: "https://domain/arcgis/rest/services",
token: response.token
});
console.log("TOKEN=" ,response.token);
}
}).error(function(err) {
console.log("operation failed err:" + err);
});
}
});
});
... View more
03-16-2022
05:43 AM
|
0
|
0
|
306
|
POST
|
Hi, We are using non federted Arcgis Server 10.6 and using Windows AD as User Store. Our login usernames like domain\username With our web applications created by Web App Builder, we want to use username without domain prefix in esri sign in dialog box. We can generate tokens with Arcgis Server Token Service with post metod. As i can see web application calls secured web services by addining this token at the end of the service adress while loading web map. İ want to build a custom login screen, users input their identity data then by using post with domain prefix i will get token for secured services and redirect to web app builder application. But how to use this token with web application on the redirected page to bypass esri identity manager? Thanks... Arcgis Gis Server 10.6 Server Security User Store: Windows Domain Role Store:ArcGIS Server Built-in Authentication Tier:GIS Server Authentication Mode:ArcGIS Tokens
... View more
03-11-2022
03:05 AM
|
0
|
1
|
350
|
POST
|
Hi, We are using non federted Arcgis Server 10.6 and using Windows AD as User Store. Our login usernames like domain\username With our web applications created by Web App Builder, we want to use username without domain prefix in esri sign in dialog box. We modified sign in dialog box with esri.bundle.identity.info and css not to show service adress and able to add custom login text. As i can see there is a solution with portal logins but could not find any with server side. i tried adding “checkForMultipleUsernameFormats”: "true" to Arcgis Server Administrator > Security > Config > updateIdentityStore configration file but failed. thanks. Arcgis Gis Server 10.6 Server Security User Store: Windows Domain Role Store:ArcGIS Server Built-in Authentication Tier:GIS Server Authentication Mode:ArcGIS Tokens
... View more
07-08-2021
04:11 AM
|
0
|
0
|
380
|
POST
|
Edit - I use our second enterprise portal version 10.7 and with anonymous access disabled, everything worked well. solved with new version. Hi i created a dashboard with arcgis 10.6.1 enterprise portal, also allow anonymous access to my portal checkbox is unchecked. All webmaps, dashboard app and all layers set for public. As i can see Keith Olsen solved that problem because i can open his test dashboard but i can not open his webmap or his portal provided as links at upper messages. How can i make my dashboard totally public with this settings, because i do not want to allow anomous access other portal items. Thanks.
... View more
02-12-2020
04:53 AM
|
0
|
0
|
1272
|
POST
|
Hi. my problem solved. I choose the right Srid then symbols showed on the web map. INSERT INTO sde.data_table (objectid, name, globalid, shape)VALUES (sde.next_rowid('sde', 'data_table'),'dataname',sde.next_globalid(),sde.ST_Geometry('point (622000 4122000)', 300001));
... View more
07-02-2017
11:18 PM
|
2
|
0
|
658
|
POST
|
i am using Arcgis for Server and Arcgis Portal webmaps with Postgresql db. Created a Feature Class with ArcCatalog and shared as Feature Service, so i am trying to add data to this Feature Class with a Sql Query. (Geometry column name "shape") i made success adding data with these queries; INSERT INTO sde.data_table (objectid, name, globalid, shape)VALUES (21,'dataname',sde.next_globalid(),sde.ST_Geometry('point (622000 4122000)', 32635)); or INSERT INTO sde.data_table (objectid, name, globalid, shape)VALUES (21,'dataname',sde.next_globalid(),sde.ST_Geometry('point (622000 4122000)', 32635)); or INSERT INTO sde.data_table (objectid, name, globalid, shape)VALUES (sde.next_rowid('sde', 'data_table'),'dataname',sde.next_globalid(),sde.ST_Geometry('point (622000 4122000)', 32635)); My problem is; I can see data with Arcmap's and Webmap created with Portal Attribute Table, but i cannot see point symbol on the map, it is there but no symbol, also i cannot identify with a mouse click. Just like a hidden object. PostgreSQL 9.4.5 / Arcmap 10.4 / Arcgis For Server / Arcgis Portal
... View more
06-29-2017
10:57 PM
|
0
|
1
|
1279
|
Title | Kudos | Posted |
---|---|---|
2 | 07-02-2017 11:18 PM |
Online Status |
Offline
|
Date Last Visited |
03-20-2024
02:04 PM
|