From 3c791cc35b31178da4ed44a887f80d5200f8db04 Mon Sep 17 00:00:00 2001 From: Justin Date: Mon, 8 Feb 2016 13:07:39 -0500 Subject: [PATCH] Add simple readme --- README.md | 8 ++++++ includes/filters.php | 1 - library/class-wo-api.php | 6 ++--- library/keys/private_key.pem | 50 ++++++++++++++++++------------------ library/keys/public_key.pem | 14 +++++----- 5 files changed, 42 insertions(+), 37 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..66ef511 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# [WP OAuth Server](https://wp-oauth.com/) + +Create and Manage an OAuth 2.0 server powered by WordPress. Become a Single Sign On Provider and or resource server. +WP OAuth Server is built for medium to large business's but works well for small and personal projects as well. + +This plugin only supports WordPress 4.4.0 or greater + + diff --git a/includes/filters.php b/includes/filters.php index b7de53d..bd5ddad 100644 --- a/includes/filters.php +++ b/includes/filters.php @@ -81,7 +81,6 @@ function wo_default_scopes () { /** * DEFAULT DESTROY METHOD * This method has been added to help secure installs that want to manually destroy sessions (valid access tokens). - * * @since 3.1.5 */ function _wo_method_destroy ( $token = null ) { diff --git a/library/class-wo-api.php b/library/class-wo-api.php index fc8c93b..436e55c 100644 --- a/library/class-wo-api.php +++ b/library/class-wo-api.php @@ -174,10 +174,8 @@ | OpenID Discovery |-------------------------------------------------------------------------- | -| Presents a basic json encoded response for OpenID Discovery. -| - issuer MUST be HTTPS and match */ -if ($well_known == 'openid-configuration') { +if ( $well_known == 'openid-configuration' ) { $openid_configuration = array( 'issuer' => site_url( null, 'https' ), 'authorization_endpoint' => site_url( '/oauth/authorize' ), @@ -220,7 +218,7 @@ // Check the token provided $response = new OAuth2\Response(); - if ( !$server->verifyResourceRequest(OAuth2\Request::createFromGlobals())) { + if ( ! $server->verifyResourceRequest( OAuth2\Request::createFromGlobals() ) ) { $response->setError(400, 'invalid_request', 'Missing or invalid parameter(s)'); $response->send(); exit; diff --git a/library/keys/private_key.pem b/library/keys/private_key.pem index 12f2281..52060b9 100644 --- a/library/keys/private_key.pem +++ b/library/keys/private_key.pem @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA0B0sd82KRixVjpmB6aM4skQxM6kfQs5zjMVUKaKf9Pol0dPO -CKjki9pVjU17yX4HenCdsl0W5msQM7X/15SOuUBUzp1Afmcz/ehh0/+98qfh3vkK -7NXSlriOGHkmNOmy31/qY1I5hNLvsVmtuQ3dX2okirPrGRPkqpVyF8CYeoHEiIE+ -7dhKbyLgSoMo6D7nXdBS8vNlNVAlsxfQg9EprmjwgnKUbTQj3VdHHy4NuOwCNlT7 -zcDuYRMrb1OfKrpCTTvrEnPCsAiC7DPqRKP0pOZa/O8YSbH5EikRSOuOAsAC5HC9 -ITFm1qzWkrBq0GweOqJ85hLi47CMyvl0AEcEAwIDAQABAoIBACF1DzkTai9t4TNT -qncNLog6Pk632ba7ygfPkYBADMctj/bzviPWQyfYqfhVhJkYEcu1XyTVomDYxXoK -wF7AG1Hc7cVpsnyfytP/D/stGjRwmPdnwkHg/kIM2YtFrsbC62bN3Liq92RLJQ22 -BR/DAtvcDJPf6OPXNuPVssnuxJStDcsJ7vT1XJsUPys1pfqVNnQYBiKH79DfAXuh -BmZNIx6E/SLJSKz9HA3YQFbicRbDbKzeFVkZCO+J1rX8HhkGwHMtATUO54SqsCkV -bu6TkjCT64LIRQUkTdlFyF5BW0dMilAtF3U9ArSmmszvylGMmxOEoMFivNDrzzsC -33cbYUECgYEA8NxKHh5AUmr8izF48Rqg3XVWqpP/nCnEBVKlB9GqI8Pdq/OfSeBO -HKp/6wWoMiIGdhbW5XiMavOcz9WTM0623Eh6OIR02AtsLtGHcqvk8w4V1vDxA261 -4NZ3Lgxfmc9KUWCPY7a5kF6gmowCP1z3rN+GlMIR3MAiLydjZBn7jX0CgYEA3TH0 -y7LqJ287qOOplOf5wu1fKu7XWUGdLMDM7XNICIx1/c8CcRRvn+kQ8NKBlP/yfMKC -5JdVgj9Tmyri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ZJL1htF2JiYnG1M9kEO2ZbxByvSKwhDgC+ipKdcAwDSgBT9rhBEJQU +J52hmmds02SMWr/awOrO7F4TWHVms0h4YrQrE5ga0331BLt3pnU= -----END RSA PRIVATE KEY----- diff --git a/library/keys/public_key.pem b/library/keys/public_key.pem index 746e6b1..af76e3a 100644 --- a/library/keys/public_key.pem +++ b/library/keys/public_key.pem @@ -1,9 +1,9 @@ -----BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0B0sd82KRixVjpmB6aM4 -skQxM6kfQs5zjMVUKaKf9Pol0dPOCKjki9pVjU17yX4HenCdsl0W5msQM7X/15SO -uUBUzp1Afmcz/ehh0/+98qfh3vkK7NXSlriOGHkmNOmy31/qY1I5hNLvsVmtuQ3d -X2okirPrGRPkqpVyF8CYeoHEiIE+7dhKbyLgSoMo6D7nXdBS8vNlNVAlsxfQg9Ep -rmjwgnKUbTQj3VdHHy4NuOwCNlT7zcDuYRMrb1OfKrpCTTvrEnPCsAiC7DPqRKP0 -pOZa/O8YSbH5EikRSOuOAsAC5HC9ITFm1qzWkrBq0GweOqJ85hLi47CMyvl0AEcE -AwIDAQAB +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvDFmKKPZ/0QmvgpYvuNj +lm5f0P7OM6d5/HxZQtRP2xQ1baZCf6ooHaoVUfjll94T4RrwgnRWBdg6tPvSpgU/ +Zc62sN76MWQb0ZZEdGssMdbiuPFwJH6//yRyYrqYzsq3k6BnC3NPzuRSww/1utbz +mqM70RWUFmdx/bnloF7rTsrGGdVMZ05GKKLj9GTI0jkHI2eGYlCZe90euWo1fFBs +nsphso8Yb4f4CZYk9u+vDAJhcQCTK5P3ZWmkntHR+3Z/j+drXugm9syVLCNcsIxf +tYdOnyq4cILNKlLmJeXjEJntKdyiE7quGA7+eaia1uPqmdBO0Y5BhQV41aj+GwZl +jwIDAQAB -----END PUBLIC KEY-----