SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Backtrace:
0 C:\xamp\htdocs\okta\simplesamlphp\www\module.php:180 (N/A)
Caused by: Exception: Failed to parse XML string.
Backtrace:
7 C:\xamp\htdocs\okta\simplesamlphp\lib\SimpleSAML\Metadata\SAMLParser.php:333 (SimpleSAML_Metadata_SAMLParser::parseDescriptorsString)
6 C:\xamp\htdocs\okta\simplesamlphp\saml-autoconfig.php:54 (require)
5 C:\xamp\htdocs\okta\simplesamlphp\config\authsources.php:2 (require)
4 C:\xamp\htdocs\okta\simplesamlphp\lib\SimpleSAML\Configuration.php:114 (SimpleSAML_Configuration::loadFromFile)
3 C:\xamp\htdocs\okta\simplesamlphp\lib\SimpleSAML\Configuration.php:178 (SimpleSAML_Configuration::getConfig)
2 C:\xamp\htdocs\okta\simplesamlphp\lib\SimpleSAML\Auth\Source.php:330 (SimpleSAML_Auth_Source::getById)
1 C:\xamp\htdocs\okta\simplesamlphp\modules\saml\www\sp\saml2-acs.php:12 (require)
0 C:\xamp\htdocs\okta\simplesamlphp\www\module.php:137 (N/A)
saml-autoconfig.php
<?php
/* -*- coding: utf-8 -*-
* Copyright 2015 Okta, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* metadata_url_for contains PER APPLICATION configuration settings.
* Each SAML service that you support will have different values here.
*
* NOTE:
* This is implemented as an array for DEMONSTRATION PURPOSES ONLY.
* On a production system, this information should be stored as approprate
* With each key below mapping to your concept of "customer company",
* "group", "organization", "team", etc.
* This should also be stored in your production datastore.
*/
$metadata_url_for = array(
/* WARNING WARNING WARNING
* You MUST remove the testing IdP (idp.oktadev.com) from a production system,
* as the testing IdP will allow ANYBODY to log in as ANY USER!
* WARNING WARNING WARNING
* For testing with http://saml.oktadev.com use the line below:
*/
// 'test' => 'http://idp.oktadev.com/metadata',
'example' => 'https://dev-540405.oktapreview.com/app/weblogpkdev930725_weblog_1/exk8fuhzpynnGw54Q0h7/sso/saml',
);
foreach($metadata_url_for as $idp_name => $metadata_url) {
/*
* Fetch SAML metadata from the URL.
* NOTE:
* SAML metadata changes very rarely. On a production system,
* this data should be cached as approprate for your production system.
*/
$metadata_xml = file_get_contents($metadata_url);
/*
* Parse the SAML metadata using SimpleSAMLphp's parser.
* See also: modules/metaedit/www/edit.php:34
*/
SimpleSAML_Utilities::validateXMLDocument($metadata_xml, 'saml-meta');
$entities = SimpleSAML_Metadata_SAMLParser::parseDescriptorsString($metadata_xml);
$entity = array_pop($entities);
$idp = $entity->getMetadata20IdP();
$entity_id = $idp['entityid'];
/*
* Remove HTTP-POST endpoints from metadata,
* since we only want to make HTTP-GET AuthN requests.
*/
for($x = 0; $x < sizeof($idp['SingleSignOnService']); $x++) {
$endpoint = $idp['SingleSignOnService'][$x];
if($endpoint['Binding'] == 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST') {
unset($idp['SingleSignOnService'][$x]);
}
}
/*
* Don't sign AuthN requests.
*/
if(isset($idp['sign.authnrequest'])) {
unset($idp['sign.authnrequest']);
}
/*
* Set up the "$config" and "$metadata" variables as used by SimpleSAMLphp.
*/
$config[$idp_name] = array(
'saml:SP',
'entityID' => null,
'idp' => $entity_id,
// NOTE: This is how you configure RelayState on the server side.
// 'RelayState' => "",
);
$metadata[$entity_id] = $idp;
}
it seems like there is an error on the configuration you have done in the SimpleSAMLPhp. Can you please provide the configuration you have done inside saml-autoconfig.php file as well as under config.php?
Related
This issue "Documenting WebSockets #501"
said "apiDoc was not designed for websockets, but i think you can use it too. The #api /endpoint/path must be replaced with the function / message name, the parameters could be documented the same way."
This is my code :
/**
* #api onBinaryMessage Set a binary message handler on the connection.
*
* #apiGroup websocket
* #apiParam {Buffer} buffer
* #apiParam {ServerWebSocket} websocket
*/
result
Is there a standard usage? Orz
i tried creating new migration and in my migration file i got the following text
/**
* Gets the first element of `array`.
*
* #static
* #memberOf _
* #since 0.1.0
* #alias first
* #category Array
* #param {Array} array The array to query.
* #returns {*} Returns the first element of `array`.
* #example
*
* _.head([1, 2, 3]);
* // => 1
*
* _.head([]);
* // => undefined
*/
function head(array) {
return (array && array.length) ? array[0] : undefined;
}
module.exports = head;
instead of the normal migration code,
i tried installing the composer , composer dump-autoload
tried clearing cache
but still no luck , it was not like this earlier as i have created many migrations and they were working fine but suddenly it gave me this error,
any idea what is causing this error
Can anyone please explain, why the ignite is using the 31100 port. I have got the info in web as it is a time server port. I couldn't get anything other than this info.
I see following configuration options in Ignite project:
/** Base port number for time server. */
private int timeSrvPortBase = DFLT_TIME_SERVER_PORT_BASE; // 31100
/** Port number range for time server. */
private int timeSrvPortRange = DFLT_TIME_SERVER_PORT_RANGE; // 100
/**
* Gets base UPD port number for grid time server. Time server will be started on one of free ports in range
* {#code [timeServerPortBase, timeServerPortBase + timeServerPortRange - 1]}.
* <p>
* Time server provides clock synchronization between nodes.
*
* #return Time
*/
public int getTimeServerPortBase() {
return timeSrvPortBase;
}
/**
* Defines port range to try for time server start.
*
* If port range value is <tt>0</tt>, then implementation will try bind only to the port provided by
* {#link #setTimeServerPortBase(int)} method and fail if binding to this port did not succeed.
*
* #return Number of ports to try before server initialization fails.
*/
public int getTimeServerPortRange() {
return timeSrvPortRange;
}
But I don't see any usage of this methods in other places. Looks like and obsolete feature. I've just started one server node of 2.10 and didn't see any open ports in range 311xx (sudo netstat -atnp | grep 311[0-9][0-9] was empty). Are you sure that your Ignite instance exposes this port? What version do you use?
I have an error said "Expected Resource or Concept" in playground hyperledger-composer
Two participants
1. School
2. Company
Two assets
1. Transcript
2. Transcript_status
One transaction updateStatus:
• Update student’s transcript status from unread to either not interested or interested
Participant school, student, company
Assets Transcript, Transcript_status
Transaction updateStatus
School creates a participant school
Company creates a participant company
School creates an asset transcript
Company creates an asset transcript_status
Workflow: After creating student’s asset (transcript), schools can upload the record to its website, and companies can view the first asset Transcript. After that, companies can submit transaction Transcript_status and marked as read. Then the asset Transcript_status will be updated from unread to read.
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Definition of a Bond, based on the FpML schema:
* http://www.fpml.org/spec/fpml-5-3-2-wd-2/html/reporting/schemaDocumentation/schemas/fpml-asset-5-3_xsd/elements/bond.html
*
*/
namespace org.school.education
participant School identified by Schoolid {
o String Schoolid
o String name
}
participant Company identified by Companytid {
o String Companytid
o String name
}
participant Student identified by Studentid {
o String Studentid
o String studentName
o String ClassofYear
}
asset Transcript identified by tId{
o String tId
o String name
o String ClassofYear
o String gpa
o String major
o String jobexp optional
o String nationality
o Boolean readStatus default=false
--> School school
}
asset TranscriptStatus identified by tsId{
o String tsId
o String name
o String status
o String ReviewedCompany
--> Company company
}
transaction UpdateTranscript_status {
o String studentName
o Boolean readStatus default=false
--> School school
}
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* global getAssetRegistry */
'use strict';
/**
* Process a property that is held for sale
* #param {org.school.education.UpdateTranscript_status} updateTranscript the transcript to be updated
* #transaction
*/
async function transcriptForUpdated(TforUpdated) { // eslint-disable-line no-unused-vars
console.log('### transcriptForUpdated ' + TforUpdated.toString());
TforUpdated.readStatus = true;
const registry = await getAssetRegistry('org.school.education.Transcript');
await registry.update(TforUpdated.readStatus);
}
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Sample access control list.
*/
rule EverybodyCanReadEverything {
description: "Allow all participants read access to all resources"
participant: "org.school.education.School"
operation: READ
resource: "org.school.education.*"
action: ALLOW
}
rule EverybodyCanSubmitTransactions {
description: "Allow all participants to submit transactions"
participant: "org.school.education.School"
operation: CREATE
resource: "org.schoo;.education.UpdateTranscript_status"
action: ALLOW
}
rule OwnerHasFullAccessToTheirAssets {
description: "Allow all participants full access to their assets"
participant(p): "org.school.education.School"
operation: ALL
resource(r): "org.school.education.Transcript"
condition: (r.owner.getIdentifier() === p.getIdentifier())
action: ALLOW
}
rule SystemACL {
description: "System ACL to permit all access"
participant: "org.hyperledger.composer.system.Participant"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
rule NetworkAdminUser {
description: "Grant business network administrators full access to user resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminSystem {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
As per my understanding, I run your code. I had fix some issues. In your code, you may update a readStatus under a transcript asset. If you update a single value under s asset so you need to put an object of that asset in the Update function.
1. Model File Changes:
transaction UpdateTranscript_status {
o Boolean readStatus default=false
--> Transcript transcript
}
2. logic.js Changes:
async function transcriptForUpdated(TforUpdated) {
// eslint-disable-line no-unused-vars
TforUpdated.readStatus = true;
TforUpdated.transcript.readStatus = TforUpdated.readStatus;
const registry = await getAssetRegistry('org.school.education.Transcript');
await registry.update(TforUpdated.transcript);
}
After Running this transaction it will update a readStatus (false value update by true) under a Transcript asset.
Hope it will fix your issue :)
I want to use WatiN to verify the error message in a JavaScript alert box. Is this possible? Thanks.
see Trev's Blog and here as well.
using(IE ie = new IE("http://hostname/pagename.htm"))
{
AlertDialogHandler alertDialogHandler = new AlertDialogHandler();
using (new UseDialogOnce(ie.DialogWatcher, alertDialogHandler ))
{
/*************************************
* -- alert -- *
* *
* must use the "NoWait" to allow *
* the code to goto the next line *
* *
*************************************/
alertDialogHandler.WaitUntilExists();
alertDialogHandler.OKButton.Click();
ie.WaitForComplete();
}
}