├── .gitignore ├── CONTRIBUTING.md ├── Components.md ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── README.md~ ├── build_docs.sh ├── docs ├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Rakefile ├── config.rb └── source │ ├── consent-management-api.md │ ├── fonts │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ └── icomoon.woff │ ├── identity-api.md │ ├── images │ └── logo.png │ ├── javascripts │ ├── all.js │ ├── jquery.tocify.js │ ├── jquery_ui.js │ └── lang_selector.js │ ├── layouts │ └── layout.erb │ ├── stylesheets │ ├── icon-font.scss │ ├── normalize.css │ ├── print.css.scss │ ├── screen.css.scss │ ├── syntax.css.scss.erb │ └── variables.scss │ ├── token-validation-api.md │ └── user-management.md └── src ├── .gitignore └── gateway ├── .gitignore ├── identity-authentication-spi ├── apiproxy │ ├── Identity-Authentication-API.xml │ ├── policies │ │ ├── AssignIdentifierResponse.xml │ │ ├── Option.AssignResponse.xml │ │ └── RaiseFault.BadRequest.xml │ └── proxies │ │ └── default.xml ├── config.json ├── pom.xml ├── readme.txt └── tests │ └── sample-test.jmx ├── identity-consent-app-node-module ├── consent │ ├── app.js │ ├── config.json │ ├── package.json │ ├── public │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── images │ │ │ ├── ajax-loader.gif │ │ │ └── logo.png │ │ ├── js │ │ │ ├── app.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery-1.10.2.js │ │ ├── stylesheets │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ ├── normalize.css │ │ │ └── style.css │ │ └── ui │ │ │ ├── config.rb │ │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ ├── main.css │ │ │ └── navbar-fixed-top.css │ │ │ ├── fonts │ │ │ ├── CRONMI__.ttf │ │ │ ├── CRONOSMM.TTF │ │ │ ├── CronosPro-Bold.otf │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ │ ├── images │ │ │ ├── Colombia.png │ │ │ ├── El-Salvador.png │ │ │ ├── Switch.png │ │ │ ├── close-icon.png │ │ │ ├── error-close.png │ │ │ ├── error-info.png │ │ │ ├── facebook-circle.png │ │ │ ├── flags │ │ │ │ ├── Bolivia.png │ │ │ │ ├── Chad.png │ │ │ │ ├── Colombia.png │ │ │ │ ├── Congo-Brazzaville.png │ │ │ │ ├── Costa-Rica.png │ │ │ │ └── El Salvador.png │ │ │ ├── google+-circle.png │ │ │ ├── icon1.png │ │ │ ├── icons │ │ │ │ ├── aplicacion.png │ │ │ │ ├── billetera.png │ │ │ │ ├── home (1).png │ │ │ │ ├── img_feature.jpg │ │ │ │ ├── img_feature_circular.png │ │ │ │ ├── img_smart.jpg │ │ │ │ ├── img_smart_circular.png │ │ │ │ └── usuario.png │ │ │ ├── linkedin-circle.png │ │ │ ├── logo.png │ │ │ ├── mobile-circle.png │ │ │ ├── msn.png │ │ │ ├── twitter-circle.png │ │ │ ├── twitter.png │ │ │ └── yahoo.png │ │ │ ├── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── flow1.js │ │ │ ├── jquery.min.js │ │ │ ├── revoke_consent.js │ │ │ └── validations.js │ │ │ ├── locales │ │ │ ├── en.json │ │ │ └── es.json │ │ │ ├── navbar-fixed-top.css │ │ │ ├── sass │ │ │ ├── common.scss │ │ │ ├── header.scss │ │ │ ├── main.scss │ │ │ └── media-queries.scss │ │ │ └── stylesheets │ │ │ ├── bootstrap.min.css │ │ │ ├── common.css │ │ │ ├── header.css │ │ │ ├── main.css │ │ │ └── media-queries.css │ ├── routes │ │ └── index.js │ └── views │ │ ├── consent.ejs │ │ ├── errorflow.ejs │ │ ├── index.ejs │ │ ├── layout.ejs │ │ ├── msisdn.ejs │ │ ├── myapps.ejs │ │ ├── myprofile.ejs │ │ ├── pin.ejs │ │ ├── profile_edit.ejs │ │ ├── recovery.ejs │ │ ├── register.ejs │ │ └── socialRegister.ejs ├── modules.xml ├── pom.xml ├── public.xml ├── readme.txt ├── routes.xml ├── views.xml └── zip.xml ├── identity-consent-app ├── .gitignore ├── apiproxy │ ├── Identity-Consent-App.xml │ ├── policies │ │ ├── AddVariablesToTargetRequest.xml │ │ ├── AssignIdentifyUserRequest.xml │ │ ├── AssignInvalidMSISDNError.xml │ │ ├── AssignPasswordResttingFailedError.xml │ │ ├── AssignRegistrationFlag.xml │ │ ├── AssignRequestToCreateUser.xml │ │ ├── AssignRequestToResetPassword.xml │ │ ├── AssignRequestToSetPassword.xml │ │ ├── AssignRequestToUpdateUserProfile.xml │ │ ├── AssignResetFlag.xml │ │ ├── AssignSendSMSAPIRequest.xml │ │ ├── AssignUserAlreadyExistsError.xml │ │ ├── AssignUserAppParams.xml │ │ ├── AssignUserDoesntExistError.xml │ │ ├── AssignUserRegistrationFailedError.xml │ │ ├── AssignValidateUserRequest.xml │ │ ├── CORS.xml │ │ ├── CORSPreflight.xml │ │ ├── CheckAlreadyConsented.ServiceCallout.xml │ │ ├── CheckMSISDNExists.ServiceCallout.xml │ │ ├── CheckPinEntryTries_JS.xml │ │ ├── CheckUserExists.ServiceCallout.xml │ │ ├── CreateUser.ServiceCallout.xml │ │ ├── ExtractCheckAlreadyConsentedResponse.xml │ │ ├── ExtractIdentifyUserResponse.xml │ │ ├── ExtractResetPasswordUserDetails.xml │ │ ├── ExtractSessionId.xml │ │ ├── ExtractSessionIdFromURL.xml │ │ ├── ExtractSessionVariables.xml │ │ ├── ExtractUserAttributeAndAssignToReq.xml │ │ ├── ExtractUserCredentails.xml │ │ ├── ExtractUserDetails.xml │ │ ├── ExtractUserIdFromResponse.xml │ │ ├── ExtractValidateUserResponse.xml │ │ ├── GenerateAuthCode.AssignRequest.xml │ │ ├── GenerateAuthCode.Callout.xml │ │ ├── GenerateAuthCode.ExtractResponse.xml │ │ ├── GenerateCookieUUID.xml │ │ ├── GenerateUUID.xml │ │ ├── GetMsisdnFromHeader.xml │ │ ├── GetMsisdnFromRequest.xml │ │ ├── GetUserApps.ServiceCallout.xml │ │ ├── GetUserProfileFromUserManagement.xml │ │ ├── InvalidateSession.xml │ │ ├── ModifyNodeTargetRequestForIdentifiedUser.xml │ │ ├── ModifyReqToRegisterUser.xml │ │ ├── OauthAOC.redirectToRedirectFlow.xml │ │ ├── PageInterceptorJS.xml │ │ ├── RaiseFlagForUserSelfServiceFlow.xml │ │ ├── ReadSessionCookie_JS.xml │ │ ├── RedirectErrorInAuthorize.xml │ │ ├── RedirectErrorToCallbackURI.xml │ │ ├── RedirectToIndex.xml │ │ ├── ResetPassword.ServiceCallout.xml │ │ ├── RetrieveCodeFromURL_JS.xml │ │ ├── RevokeUserConsent.ServiceCallout.xml │ │ ├── SendCookieInResposne.xml │ │ ├── SendSMS.ServiceCallout.xml │ │ ├── ServiceCallout.IdentifyUser.xml │ │ ├── ServiceCallout.ValidateUser.xml │ │ ├── Session.GetFromCache.xml │ │ ├── Session.SetInCache.xml │ │ ├── SetFlowErrorForInvalidCode.xml │ │ ├── SetFlowErrorFromQueryParam.xml │ │ ├── SetPassword.ServiceCallout.xml │ │ ├── SetSessionError.xml │ │ ├── SetUserVariableInSession.xml │ │ ├── SetUserVariableJson.xml │ │ ├── SetVariablesInSession.xml │ │ ├── UpdateUserProfile.ServiceCallout.xml │ │ ├── UserJSON.GetFromCache.xml │ │ ├── ValidatePin.ServiceCallout.xml │ │ ├── ValidateScopeAgainstPreviousConsentedScope_JS.xml │ │ ├── extractUserIdFromUserJSON.xml │ │ ├── generateAuthCode.xml │ │ └── redirectToConsent.xml │ ├── proxies │ │ └── default.xml │ ├── resources │ │ ├── jsc │ │ │ ├── CheckPinEntryTries.js │ │ │ ├── CreateSessionJson.js │ │ │ ├── GenerateIdForCookie.js │ │ │ ├── GenerateUUID.js │ │ │ ├── GetSessionJson.js │ │ │ ├── PageInterceptor.js │ │ │ ├── readCookie.js │ │ │ ├── retrieveCodeFromURL.js │ │ │ └── validateScopeAgainstPreviousConsentedScope.js │ │ └── node │ │ │ ├── app.js │ │ │ ├── config.json │ │ │ └── package.json │ └── targets │ │ └── default.xml ├── config.json ├── config.orig ├── pom.xml ├── readme.txt ├── test │ ├── config.json │ └── test.js └── tests │ └── sample-test.jmx ├── identity-consentmgmt-api-node-module ├── consentmgmt │ ├── app.js │ ├── package.json │ ├── package.orig │ └── routes │ │ ├── index.js │ │ └── usergridUtil.js ├── modules.xml ├── pom.xml ├── public.xml ├── readme.txt ├── routes.xml ├── views.xml └── zip.xml ├── identity-consentmgmt-api ├── .gitignore ├── apiproxy │ ├── identity-consent-management.xml │ ├── policies │ │ ├── AccessTokenValidation.xml │ │ ├── AssignApplicationNameFromAccessToken.xml │ │ ├── AssignApplicationNameFromVerifyClientId.xml │ │ ├── AssignCreateConsentFlowResponse.xml │ │ ├── AssignRequestPayloadToFlowVar.xml │ │ ├── ConstructErrorResponse.xml │ │ ├── CreateResposneContent_JS.xml │ │ ├── DeleteExistingSimilarConsent.xml │ │ ├── ExtractCreateSSOTokenReqVariables.xml │ │ ├── ExtractPOSTRequestJSONVariables.xml │ │ ├── ExtractPUTRequestJSONVariables.xml │ │ ├── ExtractTargetResponseParameters.xml │ │ ├── GetSSOTokenFromRequest_JS.xml │ │ ├── ModifyCreateSSOTokenRequestToAddParams.xml │ │ ├── ModifyPUTRequestToAddParams.xml │ │ ├── ModifyRequestToAddParams.xml │ │ ├── Option.AssignResponse.xml │ │ ├── RaiseFault.ApplicationKey.xml │ │ ├── RaiseFault.InvalidAccessToken.xml │ │ ├── RaiseFault_BadRequest.xml │ │ ├── RaiseFault_InvalidQueryParam.xml │ │ ├── RaiseFault_Invalid_SSO_Operation.xml │ │ ├── RaiseFault_Unauthorized.xml │ │ ├── SetTokenLifeInRequest.xml │ │ ├── ValidateCreateSSOTokenReqVariables_JS.xml │ │ ├── ValidatePUTRequestJSONParams_JS.xml │ │ ├── ValidateRequestJSONParams_JS.xml │ │ ├── VerifyClientId.xml │ │ ├── authenticationFailed.xml │ │ ├── authorizationFailed.xml │ │ ├── challengeResponse.xml │ │ ├── setGrantType.xml │ │ └── validateBasicAuth.xml │ ├── proxies │ │ └── default.xml │ ├── resources │ │ ├── jsc │ │ │ ├── createResposneContent.js │ │ │ ├── getSSOTokenFromRequest.js │ │ │ ├── validateCreateSSOTokenReqVariables.js │ │ │ ├── validatePUTRequestJSONParams.js │ │ │ └── validateRequestJSONParams.js │ │ └── node │ │ │ ├── .gitignore │ │ │ ├── app.js │ │ │ └── routes │ │ │ └── index.js │ └── targets │ │ └── default.xml ├── config.json ├── config.orig ├── pom.xml ├── readme.txt ├── test │ ├── config.json │ └── test.js └── tests │ └── sample-test.jmx ├── identity-demo-app ├── apiproxy │ ├── identity-demo-app.xml │ ├── policies │ │ ├── AddAuthorizationReqVarInReq.xml │ │ ├── AddUserDetailsToRequest.xml │ │ ├── AssignGetAccessTokenRequest.xml │ │ ├── AssignGetUserDetailsRequest.xml │ │ ├── ExtractAccessTokenFromResponse.xml │ │ ├── ExtractUserDetailsFromResponse.xml │ │ ├── GetAccessToken_ServiceCallout.xml │ │ ├── GetUserDetails_ServiceCallout.xml │ │ └── RedirectToError.xml │ ├── proxies │ │ └── default.xml │ ├── resources │ │ └── node │ │ │ ├── app.js │ │ │ ├── node_modules.zip │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ │ ├── images │ │ │ │ ├── ajax-loader.gif │ │ │ │ ├── error.jpg │ │ │ │ ├── login.png │ │ │ │ ├── logo.jpg │ │ │ │ ├── options.png │ │ │ │ └── spot.jpg │ │ │ └── stylesheets │ │ │ │ ├── clientapp.css │ │ │ │ ├── clientapp.min.css │ │ │ │ ├── custom.css │ │ │ │ ├── normalize.css │ │ │ │ └── style.css │ │ │ ├── routes │ │ │ └── index.js │ │ │ └── views │ │ │ ├── error.ejs │ │ │ ├── index.ejs │ │ │ └── success.ejs │ └── targets │ │ └── default.xml ├── config.json ├── config.orig ├── pom.xml └── readme.txt ├── identity-oauthv2-api ├── .gitignore ├── apiproxy │ ├── oauthv2.xml │ ├── policies │ │ ├── AccessToken.ModifyReponse.xml │ │ ├── AccesstokenValidation.xml │ │ ├── AssignIdentityMessageResponse.xml │ │ ├── AssignIssuer.xml │ │ ├── AssignReplayAttackError.xml │ │ ├── AssignRequestVaribales.xml │ │ ├── AssignStoreConsentRequest.xml │ │ ├── AssignUserId.xml │ │ ├── CORS.xml │ │ ├── CORSPreflight.xml │ │ ├── CheckNonceReplayAttack.xml │ │ ├── ConvertToJSON.xml │ │ ├── CreateScopeArray_JS.xml │ │ ├── CustomizeUserProfile_JS.xml │ │ ├── ExtractAccessTokenResponse.xml │ │ ├── ExtractAuthReqParams.xml │ │ ├── ExtractSessionId.xml │ │ ├── ExtractUserProfileResponse.xml │ │ ├── GenerateAccessToken.Response.xml │ │ ├── GenerateAccessTokenClientCredentials.xml │ │ ├── GenerateUUID.xml │ │ ├── GetApiProduct.xml │ │ ├── GetScopes.xml │ │ ├── GetUserProfileFromAppServices.xml │ │ ├── JwtTokenSigning.xml │ │ ├── RaiseFault.ApplicationKey.xml │ │ ├── RaiseFault.InvalidAuthorizationRequest.xml │ │ ├── RaiseFault.InvalidRequest.xml │ │ ├── ReturnGenericFaultMessage.xml │ │ ├── SaveNonceInCache.xml │ │ ├── SendCookieInResposne.xml │ │ ├── Session.GetFromCache.xml │ │ ├── Session.SetInCache.xml │ │ ├── SetSessionPayload.xml │ │ ├── StoreConsent.ServiceCallout.xml │ │ ├── TokenErrorResponse.xml │ │ ├── ValidateRequest.xml │ │ ├── ValidateScopeValues_JS.xml │ │ ├── generateAccessToken.xml │ │ ├── generateAuthCode.xml │ │ ├── generateRefreshToken.xml │ │ ├── handleBadRequest.xml │ │ ├── redirectToConsent.xml │ │ └── validateApiKey.xml │ ├── proxies │ │ └── default.xml │ ├── resources │ │ └── jsc │ │ │ ├── CreateScopeArray.js │ │ │ ├── ExtractVariablesFromSession.js │ │ │ ├── GenerateUUID.js │ │ │ ├── ValidateRequest.js │ │ │ ├── ValidateScope.js │ │ │ └── customizeUserProfileUsingScope.js │ └── targets │ │ └── CodeGenrateFlow.xml ├── config.json ├── config.orig ├── pom.xml ├── readme.txt ├── test │ ├── config.json │ └── test.js └── tests │ └── sample-test.jmx ├── identity-sms-token-api ├── apiproxy │ ├── identity-sms-token.xml │ ├── policies │ │ ├── generate-token.xml │ │ ├── get-identifier-token.xml │ │ ├── get-identifier.xml │ │ ├── get-token-cache.xml │ │ ├── modify-token-cache.xml │ │ ├── set-create-response.xml │ │ ├── set-failure-token-response.xml │ │ ├── set-sms-payload.xml │ │ ├── set-success-token-response.xml │ │ ├── set-token-cache.xml │ │ └── verify-api-key.xml │ ├── proxies │ │ └── default.xml │ ├── resources │ │ └── jsc │ │ │ ├── generate-token.js │ │ │ └── token.js │ └── targets │ │ └── default.xml ├── config.json ├── pom.xml └── readme.txt ├── identity-usermgmt-api ├── .gitignore ├── apiproxy │ ├── identity-users.xml │ ├── proxies │ │ └── default.xml │ ├── resources │ │ └── node │ │ │ ├── Router │ │ │ ├── Route.js │ │ │ ├── index.js │ │ │ ├── request.js │ │ │ ├── response.js │ │ │ └── utils.js │ │ │ ├── package.json │ │ │ ├── package.orig │ │ │ ├── server.js │ │ │ └── user.js │ └── targets │ │ └── default.xml ├── config.json ├── config.orig ├── pom.xml ├── readme.txt ├── test │ └── test.js └── tests │ └── sample-test.jmx ├── identity-usermgmt-node-module ├── modules.xml ├── pom.xml ├── public.xml ├── readme.txt ├── routes.xml ├── usermgmt │ ├── Router │ │ ├── Route.js │ │ ├── index.js │ │ ├── request.js │ │ ├── response.js │ │ └── utils.js │ ├── package.json │ ├── package.orig │ ├── server.js │ └── user.js ├── views.xml └── zip.xml ├── java-callouts └── jwt │ ├── include │ ├── .DS_Store │ ├── commons-codec-1.8.jar │ ├── gson-2.2.2.jar │ ├── joda-time-2.0.jar │ └── jsontoken-1.0.jar │ ├── pom.xml │ ├── src │ └── main │ │ └── java │ │ └── com │ │ └── grass │ │ └── identity │ │ └── JwtSign │ │ ├── JWT_Creator.java │ │ └── JWT_Handler.java │ └── target │ ├── maven-archiver │ └── pom.properties │ └── maven-status │ └── maven-compiler-plugin │ └── compile │ └── default-compile │ ├── createdFiles.lst │ └── inputFiles.lst ├── lib ├── expressions-1.0.0.jar └── message-flow-1.0.0.jar ├── parent-pom ├── pom.xml └── readme.txt └── setup-identity ├── .DS_Store ├── config.orig ├── config.sh ├── resources ├── auth-req-param-cache.xml ├── consent-session-cache.xml ├── nonce-cache.xml └── session-cookie-cache.xml ├── setup.sh ├── usergrid.orig └── usergrid.sh /.gitignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | *.DS_Store 10 | *.zip 11 | *.jar 12 | *.class 13 | 14 | pids 15 | logs 16 | results 17 | 18 | npm-debug.log 19 | node_modules 20 | .classpath 21 | .project 22 | .settings 23 | 24 | /.idea/ 25 | 26 | *.DS_Store -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | serve-docs: 2 | cd docs/source/ && bundle exec middleman server 3 | 4 | build-docs: 5 | cd docs/source/ && bundle exec middleman build && cd ../../ && sh ./build_docs.sh -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | <> 2 | -------------------------------------------------------------------------------- /build_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | REPO="git@github.com:apigeecs/grass.git" 6 | DIR=temp-docs 7 | 8 | # Delete any existing temporary website clone 9 | rm -rf $DIR 10 | 11 | # cd into docs, and build 12 | cd docs && bundle exec middleman build && cd .. 13 | 14 | # Clone the current repo into temp folder 15 | git clone $REPO $DIR 16 | 17 | # Move working directory into temp folder 18 | cd $DIR 19 | 20 | # Checkout and track the gh-pages branch 21 | git checkout -t origin/gh-pages 22 | 23 | # Delete everything 24 | rm -rf * 25 | 26 | # Copy website files from real repo 27 | cp -R ../docs/build/* . 28 | 29 | # Stage all files in git and create a commit 30 | git add . 31 | git add -u 32 | git commit -m "docs auto-built at $(date)" 33 | 34 | # Push the new files up to GitHub 35 | git push origin gh-pages 36 | 37 | # Delete our temp & build folders 38 | cd .. 39 | rm -rf $DIR 40 | rm -rf ./docs/build -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | # If you have OpenSSL installed, we recommend updating 2 | # the following line to use "https" 3 | source 'http://rubygems.org' 4 | 5 | gem "middleman", "~>3.2.0" 6 | 7 | # For syntax highlighting 8 | gem "middleman-syntax" 9 | 10 | # Plugin for middleman to generate Github pages 11 | gem 'middleman-gh-pages' 12 | 13 | # Live-reloading plugin 14 | gem "middleman-livereload", "~> 3.1.0" 15 | 16 | gem 'redcarpet', '~> 3.1.1' 17 | 18 | # For faster file watcher updates on Windows: 19 | gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw] 20 | 21 | # Cross-templating language block fix for Ruby 1.8 22 | platforms :mri_18 do 23 | gem "ruby18_source_location" 24 | end 25 | 26 | gem "rake", "~> 10.1.0" -------------------------------------------------------------------------------- /docs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008-2013 Concur Technologies, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | not use this file except in compliance with the License. You may obtain 5 | a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | License for the specific language governing permissions and limitations 13 | under the License. -------------------------------------------------------------------------------- /docs/Rakefile: -------------------------------------------------------------------------------- 1 | require 'middleman-gh-pages' 2 | 3 | task :default => [:build] 4 | -------------------------------------------------------------------------------- /docs/config.rb: -------------------------------------------------------------------------------- 1 | set :css_dir, 'stylesheets' 2 | 3 | set :js_dir, 'javascripts' 4 | 5 | set :images_dir, 'images' 6 | 7 | set :fonts_dir, 'fonts' 8 | 9 | set :markdown_engine, :redcarpet 10 | 11 | set :markdown, :fenced_code_blocks => true, :smartypants => true, :disable_indented_code_blocks => true, :prettify => true, :tables => true, :with_toc_data => true, :no_intra_emphasis => true 12 | 13 | # Activate the syntax highlighter 14 | activate :syntax 15 | 16 | # This is needed for Github pages, since they're hosted on a subdomain 17 | activate :relative_assets 18 | set :relative_links, true 19 | 20 | # Build-specific configuration 21 | configure :build do 22 | # For example, change the Compass output style for deployment 23 | activate :minify_css 24 | 25 | # Minify Javascript on build 26 | activate :minify_javascript 27 | 28 | # Enable cache buster 29 | # activate :asset_hash 30 | 31 | # Use relative URLs 32 | # activate :relative_assets 33 | 34 | # Or use a different image path 35 | # set :http_prefix, "/Content/images/" 36 | end 37 | -------------------------------------------------------------------------------- /docs/source/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/docs/source/fonts/icomoon.eot -------------------------------------------------------------------------------- /docs/source/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/docs/source/fonts/icomoon.ttf -------------------------------------------------------------------------------- /docs/source/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/docs/source/fonts/icomoon.woff -------------------------------------------------------------------------------- /docs/source/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/docs/source/images/logo.png -------------------------------------------------------------------------------- /docs/source/javascripts/all.js: -------------------------------------------------------------------------------- 1 | //= require './jquery_ui' 2 | //= require_tree . -------------------------------------------------------------------------------- /docs/source/stylesheets/icon-font.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'icomoon'; 3 | src:font-url('icomoon.eot'); 4 | src:font-url('icomoon.eot?#iefix') format('embedded-opentype'), 5 | font-url('icomoon.ttf') format('truetype'), 6 | font-url('icomoon.woff') format('woff'), 7 | font-url('icomoon.svg#icomoon') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | 12 | %icon { 13 | font-family: 'icomoon'; 14 | speak: none; 15 | font-style: normal; 16 | font-weight: normal; 17 | font-variant: normal; 18 | text-transform: none; 19 | line-height: 1; 20 | } 21 | 22 | %icon-exclamation-sign { 23 | @extend %icon; 24 | content: "\e600"; 25 | } 26 | %icon-question-sign { 27 | @extend %icon; 28 | content: "\e601"; 29 | } 30 | %icon-info-sign { 31 | @extend %icon; 32 | content: "\e602"; 33 | } 34 | %icon-remove-sign { 35 | @extend %icon; 36 | content: "\e603"; 37 | } 38 | %icon-plus-sign { 39 | @extend %icon; 40 | content: "\e604"; 41 | } 42 | %icon-minus-sign { 43 | @extend %icon; 44 | content: "\e605"; 45 | } 46 | %icon-ok-sign { 47 | @extend %icon; 48 | content: "\e606"; 49 | } 50 | -------------------------------------------------------------------------------- /docs/source/stylesheets/syntax.css.scss.erb: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2008-2013 Concur Technologies, Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | not use this file except in compliance with the License. You may obtain 6 | a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | License for the specific language governing permissions and limitations 14 | under the License. 15 | */ 16 | 17 | @import 'variables'; 18 | 19 | <%= Rouge::Themes::Base16::Monokai.render(:scope => '.highlight') %> 20 | 21 | .highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { 22 | color: #909090; 23 | } 24 | 25 | .highlight, .highlight .w { 26 | background-color: $code-bg; 27 | } -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/.gitignore -------------------------------------------------------------------------------- /src/gateway/.gitignore: -------------------------------------------------------------------------------- 1 | */.classpath 2 | */.project 3 | */.settings/ 4 | */target/ 5 | -------------------------------------------------------------------------------- /src/gateway/identity-authentication-spi/apiproxy/Identity-Authentication-API.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1387429921493 5 | aagrawal@apigee.com 6 | 7 | identity-consent-management 8 | 1387429921493 9 | aagrawal@apigee.com 10 | 11 | AssignMessage-1 12 | responsecache 13 | 14 | 15 | default 16 | 17 | 18 | 19 | 20 | default 21 | 22 | false 23 | 24 | -------------------------------------------------------------------------------- /src/gateway/identity-authentication-spi/apiproxy/policies/AssignIdentifierResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | AssignCreateConsentFlowResponse 3 | 4 | 5 | true 6 | response 7 | 8 | 9 | 10 |
{request.header.Origin}
11 |
true
12 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
13 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
14 |
86400
15 |
16 | {"user_identifier_id" : "123456", "first_name" : "Test", "last_name" : "Test", "email" : "test@xyz.com"} 18 | 19 | 200 20 |
21 |
22 | -------------------------------------------------------------------------------- /src/gateway/identity-authentication-spi/apiproxy/policies/RaiseFault.BadRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | 8 |
Valid Domain
9 |
{request.header.origin}
10 |
true
11 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
12 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
13 |
86400
14 | 15 |
16 | 400 17 | {"error" : "invalid_request"} 19 |
20 | 21 | 22 |
23 | 24 | -------------------------------------------------------------------------------- /src/gateway/identity-authentication-spi/apiproxy/proxies/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | (request.formparam.username = null) or (request.formparam.username = "") 10 | RaiseFault.BadRequest 11 | 12 | 13 | 14 | 15 | request.formparam.username != null 16 | AssignIdentifierResponse 17 | 18 | 19 | 20 | (proxy.pathsuffix MatchesPath "/identify") and (request.verb = "POST") 21 | 22 | 23 | 24 | (request.verb = "OPTIONS") 25 | 26 | 27 | 28 | 29 | Option.AssignResponse 30 | 31 | 32 | 33 | 34 | 35 | 36 | /authenticate 37 | default 38 | secure 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/gateway/identity-authentication-spi/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "prod", 5 | "policies": [], 6 | "proxies": [], 7 | "targets": [] 8 | }, 9 | { 10 | "name": "test", 11 | "policies": [], 12 | "proxies": [], 13 | "targets": [] 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/gateway/identity-authentication-spi/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -Dusername={your-username} -Dpassword={your-password} -Dorg={your-org-name} -P{your-env-name} -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "authTypes":["social","email"] 3 | } -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "identity-consent-app", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": { 6 | "express": "2.5.8", 7 | "stylus": ">= 0.0.1", 8 | "jade": ">= 0.0.1", 9 | "ejs": ">= 0.8.4", 10 | "i18n": "0.5.0", 11 | "request": "2.81.0", 12 | "express-session": "1.9.1", 13 | "uuid" : "2.0.1" 14 | } 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/images/ajax-loader.gif -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/images/logo.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/config.rb: -------------------------------------------------------------------------------- 1 | #require 'bootstrap-sass' 2 | # Require any additional compass plugins here. 3 | 4 | 5 | # Set this to the root of your project when deployed: 6 | http_path = "/" 7 | css_dir = "stylesheets" 8 | sass_dir = "sass" 9 | #images_dir = "images" 10 | #javascripts_dir = "javascripts" 11 | 12 | # You can select your preferred output style here (can be overridden via the command line): 13 | # output_style = :expanded or :nested or :compact or :compressed 14 | 15 | # To enable relative paths to assets via compass helper functions. Uncomment: 16 | # relative_assets = true 17 | 18 | # To disable debugging comments that display the original location of your selectors. Uncomment: 19 | # line_comments = false 20 | 21 | 22 | # If you prefer the indented syntax, you might want to regenerate this 23 | # project again passing --syntax sass, or you can uncomment this: 24 | # preferred_syntax = :sass 25 | # and then run: 26 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 27 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/CRONMI__.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/CRONMI__.ttf -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/CRONOSMM.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/CRONOSMM.TTF -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/CronosPro-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/CronosPro-Bold.otf -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/Colombia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/Colombia.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/El-Salvador.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/El-Salvador.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/Switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/Switch.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/close-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/close-icon.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/error-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/error-close.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/error-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/error-info.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/facebook-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/facebook-circle.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Bolivia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Bolivia.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Chad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Chad.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Colombia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Colombia.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Congo-Brazzaville.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Congo-Brazzaville.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Costa-Rica.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/Costa-Rica.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/El Salvador.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/flags/El Salvador.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/google+-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/google+-circle.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icon1.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/aplicacion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/aplicacion.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/billetera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/billetera.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/home (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/home (1).png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/img_feature.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/img_feature.jpg -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/img_feature_circular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/img_feature_circular.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/img_smart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/img_smart.jpg -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/img_smart_circular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/img_smart_circular.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/usuario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/icons/usuario.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/linkedin-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/linkedin-circle.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/logo.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/mobile-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/mobile-circle.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/msn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/msn.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/twitter-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/twitter-circle.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/twitter.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/images/yahoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-consent-app-node-module/consent/public/ui/images/yahoo.png -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/js/revoke_consent.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | 3 | 4 | $("#grassModal").on('hidden', function(){ 5 | $("#grassModal .confirm-revoke").remove(); 6 | }); 7 | 8 | $(".revoke-consent").click(function(e){ 9 | 10 | var clientid = $(this).data("consent-id"); 11 | console.log(clientid); 12 | 13 | $.ajax({ 14 | url:"/openid/apps/revoke", 15 | type: 'GET', 16 | data:{clientid:clientid} 17 | }).done(function(){ 18 | $(".consents").find("#"+clientid).remove(); 19 | // $('#grassModal').modal('hide'); 20 | }); 21 | 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/sass/header.scss: -------------------------------------------------------------------------------- 1 | $header-background-color : #67963D; 2 | $header-border-color : #75AA45; 3 | header { 4 | background-color: $header-background-color; 5 | border:1px solid $header-border-color; 6 | border-radius: 6px 6px 0 0; 7 | 8 | padding: 3% 0; 9 | a.navbar-brand { 10 | width: 25%; 11 | padding: 0; 12 | margin: 10 0px; 13 | height: auto; 14 | margin-left: 5%; 15 | } 16 | .header-country { 17 | width: 45%; 18 | margin: 1% 5% 1% 0; 19 | float: right; 20 | a { 21 | width: 13%; 22 | margin: 4% 0; 23 | display: inline-block; 24 | float: right; 25 | &.link-globe { 26 | width: 15%; 27 | margin-right: 3%; 28 | float: left; 29 | } 30 | } 31 | select { 32 | width: 57%; 33 | float: left; 34 | margin-right: 13px; 35 | color: white; 36 | background-image: none; 37 | background-color: $header-border-color; 38 | border: $header-border-color; 39 | } 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/sass/media-queries.scss: -------------------------------------------------------------------------------- 1 | /*@media (min-width: 767px) { 2 | .home-img { 3 | margin-top: 25px; 4 | } 5 | .close-img { 6 | margin-top: 25px; 7 | } 8 | .lang-select { 9 | margin-top: 35px; 10 | } 11 | } 12 | 13 | @media (max-width: 767px) { 14 | .navbar-nav > li > a { 15 | line-height: 20px; 16 | padding-top: 10px; 17 | padding-bottom: 10px; 18 | } 19 | }*/ -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/public/ui/stylesheets/header.css: -------------------------------------------------------------------------------- 1 | /* line 3, ../sass/header.scss */ 2 | header, footer { 3 | background-color: #67963D; 4 | border: 1px solid #75AA45; 5 | border-radius: 6px 6px 0 0; 6 | padding: 3% 0; 7 | } 8 | /* line 9, ../sass/header.scss */ 9 | header a.navbar-brand, footer a.navbar-brand { 10 | width: 25%; 11 | padding: 0; 12 | margin: 10 0px; 13 | height: auto; 14 | margin-left: 5%; 15 | } 16 | /* line 16, ../sass/header.scss */ 17 | header .header-country, footer .header-country { 18 | width: 45%; 19 | margin: 1% 5% 1% 0; 20 | float: right; 21 | } 22 | /* line 20, ../sass/header.scss */ 23 | header .header-country a, footer .header-country a { 24 | width: 13%; 25 | margin: 4% 0; 26 | display: inline-block; 27 | float: right; 28 | } 29 | /* line 25, ../sass/header.scss */ 30 | header .header-country a.link-globe, footer .header-country a.link-globe { 31 | width: 15%; 32 | margin-right: 3%; 33 | float: left; 34 | } 35 | /* line 31, ../sass/header.scss */ 36 | header .header-country select, footer .header-country select { 37 | width: 57%; 38 | float: left; 39 | margin-right: 13px; 40 | color: white; 41 | background-image: none; 42 | background-color: #75AA45; 43 | border: #75AA45; 44 | } 45 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/views/errorflow.ejs: -------------------------------------------------------------------------------- 1 |
2 |

Error : <%= error%>

3 | 4 | 5 |
6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/consent/views/msisdn.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | Mobile No 5 | 6 |
7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/modules.xml: -------------------------------------------------------------------------------- 1 | 3 | modules 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consent/node_modules/ 11 | node_modules 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/public.xml: -------------------------------------------------------------------------------- 1 | 3 | public 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consent/public/ 11 | public 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/routes.xml: -------------------------------------------------------------------------------- 1 | 3 | routes 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consent/routes/ 11 | routes 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/views.xml: -------------------------------------------------------------------------------- 1 | 3 | views 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consent/views/ 11 | views 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app-node-module/zip.xml: -------------------------------------------------------------------------------- 1 | 3 | modules 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consent/node_modules/ 11 | node_modules 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /target 3 | #package.json 4 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/Identity-Consent-App.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1368621989319 5 | mcarpenter@apigee.com 6 | Manish 7 | NodeJsConsentApp 8 | 1368621989319 9 | dey.santanu@gmail.com 10 | 11 | generateAccessToken 12 | generateAuthCode 13 | generateRefreshToken 14 | handleBadRequest 15 | redirectToConsent 16 | validateApiKey 17 | 18 | 19 | default 20 | 21 | 22 | 23 | 24 | default 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AddVariablesToTargetRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AddVariablesToTargetRequest 4 | 5 | 6 | true 7 | request 8 | 9 | 10 | /openid/redirect/{sessionid} 11 | {request.header.host} 12 | /openid 13 | {appName} 14 | {scope} 15 | {isUserProfileFlow} 16 | {open_id} 17 | 18 | 19 | 20 | 21 | {sessionid} 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignIdentifyUserRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | identifyUserRequest 4 | 5 | 6 | {request.header.msisdn} 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignInvalidMSISDNError.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | request 4 | 5 | 6 | Mobile Number is not registered 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignPasswordResttingFailedError.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | request 4 | 5 | 6 | Password resetting failed 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignRegistrationFlag.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | registrationFlag 5 | true 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignRequestToCreateUser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AssignRequestToCreateUser 4 | 5 | true 6 | createUser.request 7 | 8 | 9 | 10 | 11 | 13 | { 14 | "username": "%create_email#", 15 | "personal-info": { 16 | "name": { 17 | "surname": "%create_lastName#", 18 | "given": "%create_name#", 19 | "title": "%create_title#", 20 | "complete": "%create_complete_name#" 21 | } 22 | }, 23 | 24 | "email-info": { 25 | "0": "%create_email#" 26 | }, 27 | "phone-info": { 28 | "0": "%create_msisdn#" 29 | } 30 | } 31 | 32 | POST 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignRequestToResetPassword.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AssignRequestToResetPassword 4 | 5 | true 6 | resetPassword.request 7 | 8 | 9 | 10 | {"newpassword": "%reset_password#"} 11 | 12 | POST 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignRequestToSetPassword.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AssignRequestToSetPassword 4 | 5 | true 6 | setPassword.request 7 | 8 | 9 | 10 | {"newpassword": "%create_password#"} 11 | 12 | POST 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignResetFlag.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | resetFalg 5 | true 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignSendSMSAPIRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AssignSendSMSAPIRequest 4 | 5 | true 6 | send_sms_request 7 | 8 | 9 | 10 |
application/json
11 |
[TO_BE_REPLACED]
12 |
13 | 14 | 16 | {"type":"magic","length":6,"text":"One time PIN: {token} has been generated for your request","expiry":300} 17 | 18 | POST 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignUserAlreadyExistsError.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | request 4 | 5 | 6 | Email-id already registered 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignUserAppParams.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AssignUserAppParams 4 | 5 | 6 | true 7 | request 8 | 9 | 10 | 11 | 12 | %userApps.content# 13 | 14 | 15 | POST 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignUserDoesntExistError.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | request 4 | 5 | 6 | User name is not registered 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignUserRegistrationFailedError.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | request 4 | 5 | 6 | User registration failed 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/AssignValidateUserRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | validateUserRequest 4 | 5 | 6 | { 7 | "grant_type": "password", 8 | "username": "%request.formparam.username#", 9 | "password": "%request.formparam.password#" 10 | } 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/CORS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CORS 4 | 5 | 6 | 7 | 8 |
*
9 |
10 |
11 | true 12 | 13 |
-------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/CORSPreflight.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CORSPreflight 4 | 5 | 6 | 7 | 8 | 9 |
*
10 |
POST, GET, OPTIONS
11 |
Accept, Content-Type, connection, content-length, Authorization
12 |
true
13 |
14 | 15 | 200 16 | CORS Preflight 17 |
18 |
19 | true 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/CheckAlreadyConsented.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CheckAlreadyConsented.ServiceCallout 4 | 5 | 6 | 7 | 8 | 9 |
application/json
10 |
[TO_BE_REPLACED]
11 |
12 | 13 | 14 | {client_id} 15 | {userid} 16 | 17 | GET 18 |
19 |
20 | previousConsentResponse 21 | 22 | 23 | [TO_BE_REPLACED] 24 | 25 |
26 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/CheckMSISDNExists.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CheckMSISDNExists.ServiceCallout 4 | 5 | 6 | 7 | 8 | 9 |
application/json
10 |
11 | 12 | GET 13 |
14 |
15 | userManagement.response 16 | 17 | 18 | [TO_BE_REPLACED] 19 | 20 |
21 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/CheckPinEntryTries_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | CheckPinEntryTries_JS 3 | 4 | 5 | jsc://CheckPinEntryTries.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/CheckUserExists.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CheckUserExists.ServiceCallout 4 | 5 | 6 | 7 | 8 | 9 |
application/json
10 |
11 | 12 | GET 13 |
14 |
15 | userManagement.response 16 | 17 | 18 | [TO_BE_REPLACED] 19 | 20 |
21 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/CreateUser.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | createUser.response 7 | 8 | 9 | [TO_BE_REPLACED] 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractCheckAlreadyConsentedResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | previousConsentResponse 3 | false 4 | 5 | 6 | $.scope 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractIdentifyUserResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | ExtractIdentifyUserResponse 3 | identifyUserResponse 4 | true 5 | 6 | 7 | $.user_identifier_id 8 | 9 | 10 | $.first_name 11 | 12 | 13 | $.last_name 14 | 15 | 16 | $.email 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractResetPasswordUserDetails.xml: -------------------------------------------------------------------------------- 1 | 2 | request 3 | false 4 | 5 | {reset_password} 6 | 7 | 8 | {reset_username} 9 | 10 | 11 | {username} 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractSessionId.xml: -------------------------------------------------------------------------------- 1 | 2 | request 3 | false 4 | 5 | {sessionid} 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractSessionIdFromURL.xml: -------------------------------------------------------------------------------- 1 | 2 | request 3 | false 4 | 5 | /redirect/{sessionid} 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractUserCredentails.xml: -------------------------------------------------------------------------------- 1 | 2 | request 3 | false 4 | 5 | {username} 6 | 7 | 8 | {password} 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractUserDetails.xml: -------------------------------------------------------------------------------- 1 | 2 | request 3 | false 4 | 5 | {create_msisdn} 6 | 7 | 8 | {msisdn} 9 | 10 | 11 | {create_name} 12 | 13 | 14 | {create_lastName} 15 | 16 | 17 | {userid} 18 | 19 | 20 | {create_password} 21 | 22 | 23 | {create_email} 24 | 25 | 26 | {username} 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractUserIdFromResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | ExtractUserIdFromResponse 3 | userManagement.response 4 | true 5 | 6 | 7 | $.username 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ExtractValidateUserResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | ExtractValidateUserResponse 3 | validateUserResponse 4 | true 5 | 6 | 7 | $.user.username 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GenerateAuthCode.AssignRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GenerateAuthCode.AssignRequest 4 | 5 | 6 | true 7 | authcode.request 8 | 9 | 10 | code 11 | {redirect_uri} 12 | {scope} 13 | {client_id} 14 | {userid} 15 | {nonce} 16 | 17 | 18 | 19 | GET 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GenerateAuthCode.Callout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GenerateAuthCode.Callout 4 | 5 | 6 | 7 | false 8 | 9 | authcode.response 10 | 11 | 12 | [TO_BE_REPLACED] 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GenerateAuthCode.ExtractResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | authcode.response 3 | false 4 |
5 | {appCallBackUrl} 6 |
7 |
8 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GenerateCookieUUID.xml: -------------------------------------------------------------------------------- 1 | 2 | GenerateUUID 3 |     4 |     5 |    jsc://GenerateIdForCookie.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GenerateUUID.xml: -------------------------------------------------------------------------------- 1 | 2 | GenerateUUID 3 |     4 |     5 |    jsc://GenerateUUID.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GetMsisdnFromHeader.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | msisdn 5 | request.header.x-msisdn 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GetMsisdnFromRequest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | msisdn 5 | request.formparam.msisdn 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GetUserApps.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
[TO_BE_REPLACED]
7 |
8 | 9 | {userid} 10 | 11 | 12 | GET 13 |
14 |
15 | userApps 16 | 17 | 18 | [TO_BE_REPLACED] 19 | 20 |
21 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/GetUserProfileFromUserManagement.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetUserProfileFromUserManagement 4 | 5 | 6 | 7 | 8 | 9 |
application/json
10 |
11 | 12 | GET 13 |
14 |
15 | userProfile.response 16 | 17 | 18 | [TO_BE_REPLACED] 19 | 20 |
21 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/InvalidateSession.xml: -------------------------------------------------------------------------------- 1 | 2 | consent-session-cache 3 | Global 4 | 5 | 6 | 7 | true 8 | 9 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ModifyNodeTargetRequestForIdentifiedUser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ModifyNodeTargetRequestForIdentifiedUser 4 | 5 | 6 | true 7 | request 8 | 9 | 10 | {userid} 11 | {renderConsentScreen} 12 | {display} 13 | {create_name} 14 | {create_lastName} 15 | {create_email} 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ModifyReqToRegisterUser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ModifyReqToRegisterUser 4 | 5 | 6 | true 7 | request 8 | 9 | 10 | {process} 11 | 12 | {create_msisdn} 13 | 14 | {create_name} 15 | 16 | {create_lastName} 17 | 18 | {create_password} 19 | 20 | {create_username} 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/OauthAOC.redirectToRedirectFlow.xml: -------------------------------------------------------------------------------- 1 | 2 | response 3 | true 4 | 5 | 302 6 | 7 |
{appCallBackUrl}&state={req_state}
8 |
*
9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/PageInterceptorJS.xml: -------------------------------------------------------------------------------- 1 | 2 | PageInterceptorJS 3 | 4 | 5 | jsc://PageInterceptor.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/RaiseFlagForUserSelfServiceFlow.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | isUserProfileFlow 5 | true 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ReadSessionCookie_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | ReadSessionCookie_JS 3 | 4 | 5 | jsc://readCookie.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/RedirectErrorInAuthorize.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 302 6 | 7 |
/openid/errorflow?error={flowError}&discription=invalid%20session
8 |
9 | 10 |
11 |
12 |
-------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/RedirectErrorToCallbackURI.xml: -------------------------------------------------------------------------------- 1 | 2 | response 3 | true 4 | 5 | 302 6 | 7 |
{redirect_uri}?error={flowError}&state={req_state}
8 |
*
9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/RedirectToIndex.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 302 6 | 7 |
[TO_BE_REPLACED]
8 |
{request.header.origin}
9 |
id=;Max-Age=-11; path=/
10 |
11 |
12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ResetPassword.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | resetPassword.response 7 | 8 | 9 | [TO_BE_REPLACED] 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/RetrieveCodeFromURL_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | RetrieveCodeFromURL_JS 3 | 4 | 5 | jsc://retrieveCodeFromURL.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/RevokeUserConsent.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | RevokeUserConsent.ServiceCallout 4 | 5 | 6 | 7 | 8 | 9 |
[TO_BE_REPLACED]
10 |
application/json
11 |
12 | 13 | PUT 14 | 15 | {"status": "revoked"} 16 | 17 |
18 |
19 | userApps 20 | 21 | 22 | [TO_BE_REPLACED] 23 | 24 |
25 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/SendCookieInResposne.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SendCookieInResposne 4 | 5 | 6 | true 7 | response 8 | 9 | 10 |
id={sessionIdForCookie}; Max-Age=18000; Version=1; path=/
11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/SendSMS.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | false 7 | 8 | send_sms_response 9 | 10 | 11 | [TO_BE_REPLACED] 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ServiceCallout.IdentifyUser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | false 7 | 8 | identifyUserResponse 9 | 10 | 11 | [TO_BE_REPLACED] 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ServiceCallout.ValidateUser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | false 7 | 8 | validateUserResponse 9 | 10 | 11 | [TO_BE_REPLACED] 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/Session.GetFromCache.xml: -------------------------------------------------------------------------------- 1 | 2 | Session.GetFromCache 3 | consent-session-cache 4 | session.Payload 5 | Global 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/Session.SetInCache.xml: -------------------------------------------------------------------------------- 1 | 2 | Session.SetInCache 3 | consent-session-cache 4 | sessionPayload.content 5 | Global 6 | 7 | 8 | 9 | 10 | 1200 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/SetFlowErrorForInvalidCode.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | flowError 5 | Internal_Server_Error 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/SetFlowErrorFromQueryParam.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | flowError 5 | request.queryparam.error 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/SetPassword.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | setPassword.response 7 | 8 | 9 | [TO_BE_REPLACED] 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/SetSessionError.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | flowError 5 | SESSION_INVALID 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/SetUserVariableInSession.xml: -------------------------------------------------------------------------------- 1 | 2 | SetUserVariableInSession 3 | session-cookie-cache 4 | userJSON.content 5 | Global 6 | 7 | 8 | 9 | 10 | 12000 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/SetUserVariableJson.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SetUserVariableJson 4 | 5 | 6 | true 7 | userJSON 8 | 9 | 10 | 11 | 13 | { 14 | "userid" : "%userid#" 15 | } 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/UpdateUserProfile.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | updateUserResponse 7 | 8 | 9 | [TO_BE_REPLACED] 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/UserJSON.GetFromCache.xml: -------------------------------------------------------------------------------- 1 | 2 | UserJSON.GetFromCache 3 | session-cookie-cache 4 | userJSON 5 | Global 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ValidatePin.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | 7 |
[TO_BE_REPLACED]
8 |
9 | GET 10 |
11 |
12 | validate_sms_token_response 13 | 14 | 15 | [TO_BE_REPLACED] 16 | 17 |
18 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/ValidateScopeAgainstPreviousConsentedScope_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | ValidateScopeAgainstPreviousConsentedScope_JS 3 | 4 | 5 | jsc://validateScopeAgainstPreviousConsentedScope.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/generateAuthCode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | OAuth v2.0 1 4 | 5 | GenerateAuthorizationCode 6 | 7 | 600000 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/policies/redirectToConsent.xml: -------------------------------------------------------------------------------- 1 | 2 | response 3 | true 4 | 5 | 6 | 7 | 8 | 9 | 302 10 | 11 |
[TO_BE_REPLACED]
12 |
*
13 |
*
14 | 15 |
16 |
17 |
-------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/resources/jsc/CreateSessionJson.js: -------------------------------------------------------------------------------- 1 | //var sessionVariables="client_id,response_type,scope,userid,password,redirect_uri,pre_page_id,create_msisdn,create_name,create_lastName,create_username,create_password,registrationFlag,resetFalg,socialLoginDetails"; 2 | 3 | var sessionVariables=context.getVariable("sessionVariables"); 4 | sessionVarArray=sessionVariables.split(","); 5 | var json = { }; 6 | for(var i = 0, l = sessionVarArray.length; i < l; i++) { 7 | json[sessionVarArray[i]] = context.getVariable(sessionVarArray[i]) || null; 8 | } 9 | 10 | context.removeVariable("session.Payload"); 11 | context.setVariable ("session.Payload",JSON.stringify(json)); 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/resources/jsc/GenerateIdForCookie.js: -------------------------------------------------------------------------------- 1 | function generateUUID() { 2 | var d = new Date().getTime(); 3 | var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { 4 | var r = (d + Math.random()*16)%16 | 0; 5 | d = Math.floor(d/16); 6 | return (c=='x' ? r : (r&0x7|0x8)).toString(16); 7 | }); 8 | return uuid; 9 | }; 10 | 11 | var randomnumber = generateUUID() 12 | context.setVariable("sessionIdForCookie",randomnumber); -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/resources/jsc/GenerateUUID.js: -------------------------------------------------------------------------------- 1 | function generateUUID() { 2 | var d = new Date().getTime(); 3 | var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { 4 | var r = (d + Math.random()*16)%16 | 0; 5 | d = Math.floor(d/16); 6 | return (c=='x' ? r : (r&0x7|0x8)).toString(16); 7 | }); 8 | return uuid; 9 | }; 10 | 11 | var randomnumber = generateUUID() 12 | context.setVariable("sessionid",randomnumber); -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/resources/jsc/GetSessionJson.js: -------------------------------------------------------------------------------- 1 | 2 | var session = context.getVariable("session.Payload"); 3 | var sessionVariables=context.getVariable("sessionVariables"); 4 | 5 | if(session == null){ 6 | context.setVariable("flowError","INVALID_SESSION"); 7 | } 8 | else { 9 | session=JSON.parse(session); 10 | //var sessionVar="client_id,response_type,scope,userid,password,redirect_uri,pre_page_id,create_msisdn,create_name,create_lastName,create_username,create_password,registrationFlag,resetFalg,socialLoginDetails"; 11 | sessionVarArray=sessionVariables.split(","); 12 | for(var i = 0, l = sessionVarArray.length; i < l; i++) { 13 | context.setVariable(sessionVarArray[i] , session[sessionVarArray[i]]) ; 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/resources/jsc/PageInterceptor.js: -------------------------------------------------------------------------------- 1 | currentflow = context.getVariable("proxy.pathsuffix"); 2 | previousflow = context.getVariable("previousflow") || null; 3 | error = null; 4 | if (currentflow == "/index") { 5 | 6 | if (previousflow != null && previousflow != currentflow) { 7 | error = "INVALID_SESSION"; 8 | } 9 | 10 | } else if (currentflow == "/msisdnsubmit" || currentflow == "/reset" 11 | || currentflow == "/create") { 12 | 13 | if (previousflow != "/index" && previousflow != currentflow) { 14 | error = "INVALID_SESSION"; 15 | } 16 | 17 | } else if (currentflow == "/pinSubmit") { 18 | 19 | if (previousflow != "/msisdnsubmit" && previousflow != "/create" 20 | && previousflow != "/reset" && previousflow != currentflow) { 21 | error = "INVALID_SESSION"; 22 | } 23 | } else if (currentflow == "/consent") { 24 | 25 | if (previousflow != "/index" && previousflow != currentflow) { 26 | error = "INVALID_SESSION"; 27 | } 28 | 29 | } 30 | 31 | context.setVariable("previousflow", currentflow); 32 | 33 | if (error != null) { 34 | context.setVariable("flowError", error); 35 | } -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/resources/jsc/readCookie.js: -------------------------------------------------------------------------------- 1 | var cookieHeader = context.getVariable("request.header.Cookie"); 2 | cookies=[]; 3 | 4 | if (cookieHeader != null && cookieHeader !=""){ 5 | cookies= cookieHeader.split(';') 6 | } 7 | 8 | var sessionIdForCookie=getCookie("id"); 9 | 10 | context.setVariable("sessionIdForCookie",sessionIdForCookie) 11 | 12 | 13 | function getCookie(cname) 14 | { 15 | var name = cname + "="; 16 | for(var i=0; i= 0.0.1", 8 | "jade": ">= 0.0.1", 9 | "ejs": ">= 0.8.4", 10 | "i18n": "0.5.0", 11 | "request": "2.81.0", 12 | "express-session": "1.9.1", 13 | "uuid" : "2.0.1" 14 | } 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/apiproxy/targets/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AddVariablesToTargetRequest 5 | 6 | 7 | 8 | 9 | 10 | node://app.js 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -Dusername={your-username} -Dpassword={your-password} -Dorg={your-org-name} -P{your-env-name} 4 | 5 | The node resource for this module can be found at ../identity-consent-app-node-module 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/test/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "host" : "http://darshan1234-test.apigee.net", 3 | "loginData":"username=darshan%2B1%40apigee.com&password=apigee124", 4 | "session":"b3eab914-34f1-431b-db3a-cf4d397565a1" 5 | } -------------------------------------------------------------------------------- /src/gateway/identity-consent-app/test/test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var request = require('supertest'); 3 | var should = require('should'); 4 | var config = require('./config.json'); 5 | describe('api', function(){ 6 | var url = config.host+'/openid'; 7 | describe('POST /login', function(){ 8 | it('should respond 200 OK for a valid user', function(done){ 9 | request(url) 10 | .post('/login?sessionid='+config.session) 11 | .send(config.loginData) 12 | .end(function (err, res){ 13 | if (err){ 14 | done(err); 15 | } 16 | res.should.have.property('status', 200); 17 | done(); 18 | 19 | }) 20 | }) 21 | }); 22 | describe('GET /redirect', function(){ 23 | it('should respond 302 for a valid session', function(done){ 24 | request(url) 25 | .get('/redirect/'+config.session+'?') 26 | .end(function (err, res){ 27 | if (err){ 28 | done(err); 29 | } 30 | res.should.have.property('status', 302); 31 | done(); 32 | 33 | }) 34 | }) 35 | }); 36 | }) 37 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/consentmgmt/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var express = require('express') 6 | , routes = require('./routes') 7 | , http = require('http') 8 | , store = new express.session.MemoryStore 9 | , path = require('path'); 10 | 11 | var app = module.exports = express.createServer(); 12 | 13 | // Configuration 14 | 15 | app.configure(function () { 16 | app.set('views', __dirname + '/views'); 17 | app.use(express.bodyParser()); 18 | app.use(express.methodOverride()); 19 | app.use(app.router); 20 | }); 21 | 22 | app.configure('development', function () { 23 | app.use(express.errorHandler({dumpExceptions: true, showStack: true})); 24 | }); 25 | 26 | app.configure('production', function () { 27 | app.use(express.errorHandler()); 28 | }); 29 | 30 | // Routes 31 | 32 | app.get('/consents', routes.getConsent); 33 | app.put('/consents/:consentid', routes.updateConsent); 34 | app.post('/consents', routes.createConsent); 35 | app.get('/token/sso/:sso_token', routes.SSOaction); 36 | app.post('/token/sso', routes.createSSO); 37 | app.get('/consents/validate', routes.validateConsent); 38 | 39 | 40 | app.listen(3000, function () { 41 | console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env); 42 | }); 43 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/consentmgmt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "identity-consent-mgmt", 3 | "version": "0.0.1", 4 | "private": true, 5 | "client_id": "__APPKEY__", 6 | "client_secret": "__APPSECRET__", 7 | "orgName": "__APPORG__", 8 | "appName": "__APPAPP__", 9 | "baseUrl": "__BAASURI__", 10 | 11 | "dependencies": { 12 | "express": "2.5.8", 13 | "stylus": ">= 0.0.1", 14 | "jade": ">= 0.0.1" 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/consentmgmt/package.orig: -------------------------------------------------------------------------------- 1 | { 2 | "name": "identity-consent-mgmt", 3 | "version": "0.0.1", 4 | "private": true, 5 | "client_id": "__APPKEY__", 6 | "client_secret": "__APPSECRET__", 7 | "orgName": "__APPORG__", 8 | "appName": "__APPAPP__", 9 | "baseUrl": "__BAASURI__", 10 | 11 | "dependencies": { 12 | "express": "2.5.8", 13 | "stylus": ">= 0.0.1", 14 | "jade": ">= 0.0.1" 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/modules.xml: -------------------------------------------------------------------------------- 1 | 3 | modules 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consentmgmt/node_modules/ 11 | node_modules 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/public.xml: -------------------------------------------------------------------------------- 1 | 3 | public 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consentmgmt/public/ 11 | public 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/routes.xml: -------------------------------------------------------------------------------- 1 | 3 | routes 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consentmgmt/routes/ 11 | routes 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/views.xml: -------------------------------------------------------------------------------- 1 | 3 | views 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consentmgmt/views/ 11 | views 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api-node-module/zip.xml: -------------------------------------------------------------------------------- 1 | 3 | modules 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consentmgmt/node_modules/ 11 | node_modules 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /target 3 | #package.json 4 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/identity-consent-management.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1387429921493 5 | aagrawal@apigee.com 6 | 7 | identity-consent-management 8 | 1387429921493 9 | aagrawal@apigee.com 10 | 11 | AssignMessage-1 12 | responsecache 13 | 14 | 15 | default 16 | 17 | 18 | 19 | 20 | default 21 | 22 | false 23 | 24 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/AccessTokenValidation.xml: -------------------------------------------------------------------------------- 1 | 2 | VerifyAccessToken 3 | access_token 4 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/AssignApplicationNameFromAccessToken.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | application_name 6 | apigee.developer.app.name 7 | 8 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/AssignApplicationNameFromVerifyClientId.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | application_name 6 | verifyapikey.VerifyClientId.developer.app.name 7 | 8 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/AssignCreateConsentFlowResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | AssignCreateConsentFlowResponse 3 | 4 | 5 | true 6 | response 7 | 8 | 9 | 10 |
{request.header.Origin}
11 |
true
12 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
13 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
14 |
86400
15 |
16 | %responsePayload# 18 | 19 | 200 20 |
21 |
22 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/AssignRequestPayloadToFlowVar.xml: -------------------------------------------------------------------------------- 1 | 2 | AssignRequestPayloadToFlowVar 3 | 4 | requestPayload 5 | request.content 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ConstructErrorResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | ConstructErrorResponse 3 | 4 | 5 | true 6 | response 7 | 8 | 9 | 10 |
{request.header.Origin}
11 |
true
12 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
13 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
14 |
86400
15 |
16 | 400 17 | 18 | { "error_code" : "$response.header.error_code%", 19 | "error_description" : "$response.header.error_description%" 20 | } 21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/CreateResposneContent_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | CreateResposneContent_JS 3 | 4 | 5 | jsc://createResposneContent.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/DeleteExistingSimilarConsent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | DeleteExistingSimilarConsent 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | client_id = '{client_id}' and end_user_id= '{end_user_id}' 12 | [TO_BE_REPLACED] 13 | [TO_BE_REPLACED] 14 | 15 | DELETE 16 | 17 | 18 | removeConsentResponse 19 | 20 | 21 | [TO_BE_REPLACED] 22 | 23 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ExtractCreateSSOTokenReqVariables.xml: -------------------------------------------------------------------------------- 1 | 2 | ExtractCreateSSOTokenReqVariables 3 | 4 | 5 | true 6 | request 7 | 8 | 9 | $.site_id 10 | 11 | 12 | $.access_token 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ExtractPUTRequestJSONVariables.xml: -------------------------------------------------------------------------------- 1 | 2 | ExtractPUTRequestJSONVariables 3 | 4 | 5 | true 6 | request 7 | 8 | 9 | $.access_token 10 | 11 | 12 | $.scope 13 | 14 | 15 | $.status 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ExtractTargetResponseParameters.xml: -------------------------------------------------------------------------------- 1 | 2 | ExtractResponseParameters 3 | 4 | 5 | true 6 | response 7 | 8 | 9 | $.consent_id 10 | 11 | 12 | $.last_updated 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/GetSSOTokenFromRequest_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | ValidateRequestJSONParams_JS 3 | 4 | 5 | jsc://getSSOTokenFromRequest.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ModifyCreateSSOTokenRequestToAddParams.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ModifyCreateSSOTokenRequestToAddParams 4 | 5 | 6 | 7 | 8 | 9 | {access_token} 10 | {site_id} 11 | 12 | 13 | 14 | true 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ModifyPUTRequestToAddParams.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ModifyPUTRequestToAddParams 4 | 5 | 6 | 7 | 8 | 9 | {access_token} 10 | {scope} 11 | {status} 12 | 13 | 14 | 15 | true 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/RaiseFault.ApplicationKey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 |
Valid Domain
8 |
{request.header.origin}
9 |
true
10 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
11 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
12 |
86400
13 | 14 |
15 | 400 16 | 17 | 18 | { "error_code" : "Bad_request", 19 | "error_description" : "Invalid client id" 20 | } 21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/RaiseFault.InvalidAccessToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 |
Valid Domain
8 |
{request.header.origin}
9 |
true
10 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
11 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
12 |
86400
13 | 14 |
15 | 400 16 | 17 | 18 | { "error_code" : "Bad_request", 19 | "error_description" : "Invalid access token" 20 | } 21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/RaiseFault_BadRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 6 |
Valid Domain
7 |
{request.header.origin}
8 |
true
9 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
10 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
11 |
86400
12 |
13 | 400 14 | 15 | { "error_code" : "$errorType%", 16 | "error_description" : "$errorDesc%" 17 | } 18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/RaiseFault_InvalidQueryParam.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 6 |
Valid Domain
7 |
{request.header.origin}
8 |
true
9 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
10 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
11 |
86400
12 |
13 | 400 14 | 15 | { "error_code" : "invalid_request", 16 | "error_description" : "invalid end_user_id or client_id" 17 | } 18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/RaiseFault_Invalid_SSO_Operation.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 6 |
Valid Domain
7 |
{request.header.origin}
8 |
true
9 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
10 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
11 |
86400
12 |
13 | 400 14 | 15 | { "error_code" : "invalid_request", 16 | "error_description" : "invalid action value" 17 | } 18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/RaiseFault_Unauthorized.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 6 |
Valid Domain
7 |
{request.header.origin}
8 |
true
9 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
10 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
11 |
86400
12 |
13 | 400 14 | 15 | { "error_code" : "Unauthorized", 16 | "error_description" : "$errorDesc%" 17 | } 18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/SetTokenLifeInRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SetTokenLifeInRequest 4 | 5 | 6 | 7 | 8 | 9 | 3000 10 | 11 | 12 | 13 | 14 | true 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ValidateCreateSSOTokenReqVariables_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | ValidateCreateSSOTokenReqVariables_JS 3 | 4 | 5 | jsc://validateCreateSSOTokenReqVariables.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ValidatePUTRequestJSONParams_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | ValidatePUTRequestJSONParams_JS 3 | 4 | 5 | jsc://validatePUTRequestJSONParams.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/ValidateRequestJSONParams_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | ValidateRequestJSONParams_JS 3 | 4 | 5 | jsc://validateRequestJSONParams.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/VerifyClientId.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | VerifyClientId 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/authenticationFailed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | 8 |
Valid Domain
9 |
{request.header.origin}
10 |
true
11 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
12 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion 13 |
14 |
86400
15 | 16 |
17 | 401 18 | 19 | 20 | { "error_code" : "Unauthorized", 21 | "error_description" : "Invalid client_id" 22 | } 23 |
24 | 25 | 26 |
Basic realm="Bluvia"
27 |
*
28 |
29 |
30 | 31 |
32 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/challengeResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | 5 | 6 | 7 |
Valid Domain
8 |
{request.header.origin}
9 |
true
10 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
11 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
12 |
86400
13 | 14 |
15 | 401 16 | 17 | { "error_code" : "AUTHENTICATION_FAILED", 18 | "error_description" : "Authorization header missing" 19 | } 20 | 21 |
22 |
23 |
-------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/setGrantType.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | var.grantType 5 | client_credentials 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/policies/validateBasicAuth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GenerateAccessToken 5 | 4000 6 | 7 | client_credentials 8 | 9 | var.grantType 10 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/resources/jsc/createResposneContent.js: -------------------------------------------------------------------------------- 1 | var responseJson=JSON.parse(context.getVariable("requestPayload")); 2 | var consent_id = context.getVariable("consent_id"); 3 | var last_updated = context.getVariable("last_updated"); 4 | var sso_token= context.getVariable("last_updated"); 5 | var application_name=context.getVariable("application_name"); 6 | 7 | responseJson.consent_id=consent_id; 8 | responseJson.last_updated=last_updated; 9 | responseJson.application_name=application_name; 10 | 11 | if (sso_token == null || sso_token ==""){ 12 | responseJson.sso_token=[]; 13 | 14 | } 15 | context.setVariable("responsePayload",JSON.stringify(responseJson)); 16 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/resources/jsc/getSSOTokenFromRequest.js: -------------------------------------------------------------------------------- 1 | var authHeader = context.getVariable("request.header.Authorization"); 2 | var sso_token = null; 3 | if (authHeader != null && authHeader.split(" ").length > 1 && authHeader.split(" ")[0] == "SSO") { 4 | sso_token = authHeader.split(" ")[1]; 5 | context.setVariable("request.queryparam.sso_token",sso_token); 6 | } else { 7 | context.setVariable("errorDesc", "Invalid Authorization header"); 8 | context.setVariable("errorType", "Unauthorized"); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/resources/node/.gitignore: -------------------------------------------------------------------------------- 1 | package.json 2 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/resources/node/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Module dependencies. 4 | */ 5 | 6 | var express = require('express') 7 | , routes = require('./routes') 8 | , http = require('http') 9 | , store = new express.session.MemoryStore 10 | , path = require('path'); 11 | 12 | var app = module.exports = express.createServer(); 13 | 14 | // Configuration 15 | 16 | app.configure(function(){ 17 | app.set('views', __dirname + '/views'); 18 | app.use(express.bodyParser()); 19 | app.use(express.methodOverride()); 20 | app.use(app.router); 21 | }); 22 | 23 | app.configure('development', function(){ 24 | app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); 25 | }); 26 | 27 | app.configure('production', function(){ 28 | app.use(express.errorHandler()); 29 | }); 30 | 31 | // Routes 32 | 33 | app.get('/consents', routes.getConsent); 34 | app.put('/consents/:consentid', routes.updateConsent); 35 | app.post('/consents', routes.createConsent); 36 | app.get('/token/sso/:sso_token', routes.SSOaction); 37 | app.post('/token/sso', routes.createSSO); 38 | app.get('/consents/validate', routes.validateConsent); 39 | 40 | 41 | app.listen(3000, function(){ 42 | console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env); 43 | }); 44 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/apiproxy/targets/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | node://app.js 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "prod", 5 | "policies": [ 6 | 7 | ], 8 | "proxies": [], 9 | "targets": [] 10 | }, 11 | { 12 | "name": "test", 13 | "policies": [ 14 | { 15 | "name": "DeleteExistingSimilarConsent.xml", 16 | "tokens": [ 17 | { 18 | "xpath": "/ServiceCallout/Request/Set/QueryParams/QueryParam[@name='client_id']", 19 | "value": "__APPKEY__" 20 | }, 21 | { 22 | "xpath": "/ServiceCallout/Request/Set/QueryParams/QueryParam[@name='client_secret']", 23 | "value": "__APPSECRET__" 24 | }, 25 | { 26 | "xpath": "/ServiceCallout/HTTPTargetConnection/URL", 27 | "value": "__BAASURI__/__APPORG__/__APPAPP__/consents" 28 | } 29 | ] 30 | }], 31 | "proxies": [], 32 | "targets": [] 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/config.orig: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "prod", 5 | "policies": [ 6 | 7 | ], 8 | "proxies": [], 9 | "targets": [] 10 | }, 11 | { 12 | "name": "test", 13 | "policies": [ 14 | { 15 | "name": "DeleteExistingSimilarConsent.xml", 16 | "tokens": [ 17 | { 18 | "xpath": "/ServiceCallout/Request/Set/QueryParams/QueryParam[@name='client_id']", 19 | "value": "__APPKEY__" 20 | }, 21 | { 22 | "xpath": "/ServiceCallout/Request/Set/QueryParams/QueryParam[@name='client_secret']", 23 | "value": "__APPSECRET__" 24 | }, 25 | { 26 | "xpath": "/ServiceCallout/HTTPTargetConnection/URL", 27 | "value": "__BAASURI__/__APPORG__/__APPAPP__/consents" 28 | } 29 | ] 30 | }], 31 | "proxies": [], 32 | "targets": [] 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -Dusername={your-username} -Dpassword={your-password} -Dorg={your-org-name} -P{your-env-name} 4 | 5 | The node resource for this module can be found at ../identity-consentmgmt-node-module 6 | -------------------------------------------------------------------------------- /src/gateway/identity-consentmgmt-api/test/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "createConsent": 3 | { 4 | "company_id":"IdentityApp", 5 | "scope":["openid","profile","email"], 6 | "consent_type":"in-band", 7 | "status":"active", 8 | "end_user_id":"darshan+1@apigee.com", 9 | "client_id":"1M996hWk1xQAlzrXzSBMs7pKA3CG2AbD", 10 | "access_token":"uAnrvwdkmWmVJeCANLzFCK5E6qiW" 11 | }, 12 | "host":"http://darshan1234-test.apigee.net", 13 | "auth":"Basic MU05OTZoV2sxeFFBbHpyWHpTQk1zN3BLQTNDRzJBYkQ6MHdlUmlTanpaODk1ZEE0NA==", 14 | "validateConsent":"client_id=1M996hWk1xQAlzrXzSBMs7pKA3CG2AbD&user_id=darshan%2B1@apigee.com" 15 | } 16 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/identity-demo-app.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1368621989319 5 | mcarpenter@apigee.com 6 | Manish 7 | NodeJsConsentApp 8 | 1368621989319 9 | dey.santanu@gmail.com 10 | 11 | generateAccessToken 12 | generateAuthCode 13 | generateRefreshToken 14 | handleBadRequest 15 | redirectToConsent 16 | validateApiKey 17 | 18 | 19 | default 20 | 21 | 22 | 23 | 24 | default 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/AddAuthorizationReqVarInReq.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | true 5 | request 6 | 7 | 8 | [TO_BE_REPLACED] 9 | [TO_BE_REPLACED] 10 | [TO_BE_REPLACED] 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/AddUserDetailsToRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | true 7 | request 8 | 9 | 10 | {name} 11 | {surname} 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/AssignGetAccessTokenRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | true 7 | generate_access_token_request 8 | 9 | 10 | authorization_code 11 | {request.queryparam.code} 12 | [TO_BE_REPLACED] 13 | [TO_BE_REPLACED] 14 | [TO_BE_REPLACED] 15 | 16 | 17 |
application/json
18 |
19 | POST 20 |
21 |
22 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/AssignGetUserDetailsRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | true 7 | get_user_details_request 8 | 9 | 10 |
application/json
11 |
Bearer {access_token}
12 |
13 | GET 14 |
15 |
16 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/ExtractAccessTokenFromResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | generate_access_token_response.content 3 | false 4 | 5 | 6 | $.access_token 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/ExtractUserDetailsFromResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | get_user_details_response 3 | true 4 | 5 | 6 | $.name 7 | 8 | 9 | $.surname 10 | 11 | 12 | $.email 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/GetAccessToken_ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | 5 | generate_access_token_response 6 | 7 | 8 | [TO_BE_REPLACED] 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/GetUserDetails_ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | 5 | get_user_details_response 6 | 7 | 8 | [TO_BE_REPLACED] 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/policies/RedirectToError.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 6 |
/identity_app/error
7 |
Valid Domain
8 |
{request.header.origin}
9 |
true
10 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
11 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
12 |
86400
13 |
14 | 302 15 | 16 |
17 |
18 |
-------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/node_modules.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/node_modules.zip -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "application-name" 3 | , "version": "0.0.1" 4 | , "private": true 5 | , "dependencies": { 6 | "express": "2.5.8", 7 | "express-hbs": "latest", 8 | "stylus": ">= 0.0.1", 9 | "jade": ">= 0.0.1", 10 | "ejs":"latest" 11 | } 12 | } -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/images/ajax-loader.gif -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/images/error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/images/error.jpg -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/images/login.png -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/images/logo.jpg -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/images/options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/images/options.png -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/public/images/spot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/identity-demo-app/apiproxy/resources/node/public/images/spot.jpg -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/resources/node/routes/index.js: -------------------------------------------------------------------------------- 1 | exports.index = function(req, res) { 2 | res.render('index', { 3 | title : 'Home', 4 | client_id : req.query.client_id, 5 | redirect_uri : req.query.redirect_uri, 6 | authorization_req_url : req.query.authorization_req_url 7 | }) 8 | }; 9 | 10 | exports.error = function(req, res) { 11 | res.render('error', { 12 | title : 'Error' 13 | }) 14 | }; 15 | 16 | exports.callback = function(req, res) { 17 | res.render('success', { 18 | title : 'Welcome', 19 | name : req.query.name || "", 20 | surname : req.query.surname||"" 21 | }) 22 | }; -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/apiproxy/targets/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | node://app.js 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-demo-app/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -Dusername={your-username} -Dpassword={your-password} -Dorg={your-org-name} -P{your-env-name} -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /target 3 | #package.json 4 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/oauthv2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1368621989319 5 | dey.santanu@gmail.com 6 | santanudey git: 379128b9 Santanu-Deys-MacBook-Pro.local ::Lab07 - to demonstrate OAuth 7 | oauthv2 8 | 1368621989319 9 | dey.santanu@gmail.com 10 | 11 | generateAccessToken 12 | generateAuthCode 13 | generateRefreshToken 14 | handleBadRequest 15 | redirectToConsent 16 | validateApiKey 17 | 18 | 19 | default 20 | 21 | 22 | 23 | 24 | default 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/AccessToken.ModifyReponse.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AccessToken.ModifyReponse 4 | 5 | 6 | true 7 | 8 | POST 9 | 10 | { 11 | "error": "invalid_request" 12 | } 13 | 14 | 200 15 | Response 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/AccesstokenValidation.xml: -------------------------------------------------------------------------------- 1 | 2 | VerifyAccessToken 3 | request.header.Authorization 4 | Bearer 5 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/AssignIdentityMessageResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AssignIdentityMessageResponse 4 | 5 | 6 | true 7 | 8 | POST 9 | $userProfileJson% 10 | 200 11 | Response 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/AssignIssuer.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | issuer 5 | [TO_BE_REPLACED] 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/AssignReplayAttackError.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | error_variable 5 | Invalid_Request 6 | 7 | 8 | error_type 9 | Replay%20Attack 10 | 11 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/AssignRequestVaribales.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | client_id 5 | request.header.client_id 6 | 7 | 8 | scope 9 | request.header.scope 10 | 11 | 12 | grant_type 13 | request.header.grant_type 14 | 15 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/AssignStoreConsentRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AssignStoreConsentRequest 4 | true 5 | storeConsentRequest 6 | 7 | 8 |
application/json
9 |
[TO_BE_REPLACED]
10 |
application/json
11 |
12 | 13 | { 14 | "company_id": "%apigee.developer.app.name#", 15 | "client_id": "%request.formparam.client_id#", 16 | "end_user_id": "%userid#", 17 | "scope": %scopes#, 18 | "status" : "active", 19 | "access_token" : "%apigee.access_token#", 20 | "consent_type" : "in-band" 21 | } 22 | 23 | 24 | POST 25 |
26 | 27 |
28 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/AssignUserId.xml: -------------------------------------------------------------------------------- 1 | 2 | false 3 | 4 | 5 | AssignUserId 6 | AssignUserId 7 | 8 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/CORS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CORS 4 | 5 | 6 | 7 | 8 |
{request.header.origin}
9 |
true
10 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
11 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
12 |
86400
13 |
14 |
15 | true 16 | 17 |
-------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/CORSPreflight.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CORSPreflight 4 | 5 | 6 | 7 | 8 | 9 |
{request.header.origin}
10 |
POST, GET, OPTIONS
11 |
Accept, Content-Type, connection, content-length, Authorization
12 |
true
13 |
14 | 15 | 200 16 | CORS Preflight 17 |
18 |
19 | true 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/CheckNonceReplayAttack.xml: -------------------------------------------------------------------------------- 1 | 2 | CheckNonceReplayAttack 3 | nonce-cache 4 | nonce_cache_value 5 | Global 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/ConvertToJSON.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | apiProductJSON 5 | AccessEntity.GetApiProduct 6 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/CreateScopeArray_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | CreateScopeArray_JS 3 | 4 | 5 | jsc://CreateScopeArray.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/CustomizeUserProfile_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | ValidateScopeValues_JS 3 | 4 | 5 | jsc://customizeUserProfileUsingScope.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/ExtractAccessTokenResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | response 3 | 4 | 5 | $.issued_at 6 | 7 | 8 | $.application_name 9 | 10 | 11 | $.userid 12 | 13 | 14 | $.refresh_token_status 15 | 16 | 17 | $.expires_in 18 | 19 | 20 | $.refresh_token 21 | 22 | 23 | $.nonce 24 | 25 | 26 | $.scope 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/ExtractAuthReqParams.xml: -------------------------------------------------------------------------------- 1 | 2 | ExtractAuthReqParams 3 | 4 | 5 | true 6 | authReqVariableJSON 7 | 8 | 9 | 10 | $.client_id 11 | 12 | 13 | $.response_type 14 | 15 | 16 | $.scope 17 | 18 | 19 | $.nonce 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/ExtractSessionId.xml: -------------------------------------------------------------------------------- 1 | 2 | request 3 | false 4 | 5 | {sessionid} 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/GenerateAccessToken.Response.xml: -------------------------------------------------------------------------------- 1 | 2 | response 3 | true 4 | 5 | 6 |
no-store
7 |
no-cache
8 |
9 | 10 | { 11 | "access_token": "$apigee.access_token%", 12 | "token_type": "Bearer", 13 | "refresh_token": "$refresh_token%", 14 | "expires_in": $expires_in%, 15 | "id_token": "$jws%" 16 | } 17 | 18 | 200 19 |
20 | 21 |
22 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/GenerateAccessTokenClientCredentials.xml: -------------------------------------------------------------------------------- 1 | 2 | GenerateAccessToken 3 | 3600000 4 | grant_type 5 | client_id 6 | scope 7 | 8 | client_credentials 9 | 10 | 11 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/GenerateUUID.xml: -------------------------------------------------------------------------------- 1 | 2 | GenerateUUID 3 |     4 |     5 |    jsc://GenerateUUID.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/GetApiProduct.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/GetScopes.xml: -------------------------------------------------------------------------------- 1 | 2 | apiProductJSON 3 | true 4 | 5 | 6 | $.ApiProduct.Scopes.Scope 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/GetUserProfileFromAppServices.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetUserProfileFromAppServices 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
application/json
14 |
15 | 16 | GET 17 |
18 |
19 | appservicesuserprofile 20 | 21 | 22 | [TO_BE_REPLACED] 23 | 24 |
25 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/JwtTokenSigning.xml: -------------------------------------------------------------------------------- 1 | 2 | java://jsontoken.zip 3 | com.grass.identity.JwtSign.JWT_Creator 4 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/RaiseFault.ApplicationKey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | 8 |
{request.queryparam.redirect_uri}?error=invalid_request&error_description=Invalid%20client_id&state={req_state}
9 |
Valid Domain
10 |
{request.header.origin}
11 |
true
12 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
13 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
14 |
86400
15 | 16 |
17 | 302 18 | 19 |
20 | 21 | 22 |
*
23 |
24 |
25 | 26 |
-------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/RaiseFault.InvalidAuthorizationRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 6 |
{request.queryparam.redirect_uri}?error={error_type}&error_description=Unsupported%20{error_variable}%20value&state={state}
7 |
Valid Domain
8 |
{request.header.origin}
9 |
true
10 |
OPTIONS,GET,POST,PUT,DELETE,HEAD
11 |
Authorization,Content-Type,Accept,Origin,X-Requested-With,X-CSDKVersion
12 |
86400
13 |
14 | 302 15 | 16 |
17 |
18 |
-------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/RaiseFault.InvalidRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | { 7 | "error": "invalid_request" 8 | } 9 | 10 | 400 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/ReturnGenericFaultMessage.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | 4 | 5 | 6 | { 7 | "Message": { "Error" : "BadRequest"} 8 | } 9 | 10 | 400 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/SaveNonceInCache.xml: -------------------------------------------------------------------------------- 1 | 2 | SaveNonceInCache 3 | nonce-cache 4 | nonce 5 | Global 6 | 7 | 8 | 9 | 10 | 11 | 2000 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/SendCookieInResposne.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SendCookieInResposne 4 | 5 | 6 | true 7 | response 8 | 9 | 10 |
sessionid= {sessionid}; Max-Age=18000; Version=1; path=/
11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/Session.GetFromCache.xml: -------------------------------------------------------------------------------- 1 | 2 | Session.GetFromCache 3 | consent-session-cache 4 | session.Payload 5 | Global 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/Session.SetInCache.xml: -------------------------------------------------------------------------------- 1 | 2 | Session.SetInCache 3 | consent-session-cache 4 | session.request.content 5 | Global 6 | 7 | 8 | 9 | 10 | 1200 11 | 12 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/SetSessionPayload.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SetSessionPayload 4 | 5 | 6 | true 7 | session.request 8 | 9 | 10 | 11 | 13 | {"client_id" : "%client_id#", 14 | "response_type" : "%response_type#", 15 | "scope" : "%scope#", 16 | "password":"%password#", 17 | "redirect_uri":"%redirect_uri#", 18 | "req_state":"%req_state#", 19 | "appName":"%developer.app.name#", 20 | "nonce":"%nonce#", 21 | "display":"%display#", 22 | "login_hint":"%login_hint#", 23 | "open_id":"true" 24 | 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/StoreConsent.ServiceCallout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | StoreConsent.ServiceCallout 4 | 5 | 6 | 7 | storeConsentResponse 8 | 9 | 10 | [TO_BE_REPLACED] 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/TokenErrorResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | TekenErrorResponse 4 | 5 | 6 | true 7 | 8 | 9 | { 10 | "error": "invalid_request" 11 | } 12 | 13 | 400 14 | Response 15 | 16 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/ValidateRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | ValidateRequest 3 |     4 |     5 |    jsc://ValidateRequest.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/ValidateScopeValues_JS.xml: -------------------------------------------------------------------------------- 1 | 2 | ValidateScopeValues_JS 3 | 4 | 5 | jsc://ValidateScope.js 6 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/generateAccessToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GenerateAccessToken 5 | 6 | 3600000 7 | 8 | 9 | authorization_code 10 | 11 | 12 | request.formparam.grant_type 13 | request.formparam.code 14 | request.formparam.client_id 15 | request.formparam.redirect_uri 16 | request.formparam.scope 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/generateAuthCode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | OAuth v2.0 1 4 | 5 | GenerateAuthorizationCode 6 | 600000 7 | request.queryparam.scope 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/generateRefreshToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | RefreshAccessToken 5 | -1 6 | request.formparam.grant_type 7 | request.formparam.refresh_token 8 | request.formparam.client_id 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/handleBadRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | response 4 | true 5 | 6 | 7 | { 8 | "Message": { "Error" : "BadRequest"} 9 | } 10 | 11 | 400 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/redirectToConsent.xml: -------------------------------------------------------------------------------- 1 | 2 | response 3 | true 4 | 5 | 6 | 7 | 8 | 9 | 302 10 | 11 |
[TO_BE_REPLACED]
12 |
*
13 |
*
14 |
sessionid= {sessionid}; Max-Age=18000; Version=1; path=/
15 | 16 |
17 |
18 |
-------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/policies/validateApiKey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Verify API Key 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/resources/jsc/CreateScopeArray.js: -------------------------------------------------------------------------------- 1 | var scope = context.getVariable("scope"); 2 | var scopeArray = []; 3 | 4 | if (scope != null) { 5 | scopeArray = scope.split(" "); 6 | } 7 | 8 | context.setVariable("scopes", JSON.stringify(scopeArray)); 9 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/resources/jsc/ExtractVariablesFromSession.js: -------------------------------------------------------------------------------- 1 | var sessionJson = context.getVariable("session.Payload"); 2 | var obj = JSON && JSON.parse(sessionJson) || $.parseJSON(sessionJson); 3 | 4 | context.setVariable("response_type", obj.response_type); 5 | context.setVariable("redirect_uri", obj.redirect_uri); 6 | context.setVariable("scope", obj.scope); 7 | context.setVariable("client_id", obj.client_id); 8 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/resources/jsc/GenerateUUID.js: -------------------------------------------------------------------------------- 1 | function generateUUID() { 2 | var d = new Date().getTime(); 3 | var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { 4 | var r = (d + Math.random()*16)%16 | 0; 5 | d = Math.floor(d/16); 6 | return (c=='x' ? r : (r&0x7|0x8)).toString(16); 7 | }); 8 | return uuid; 9 | }; 10 | 11 | var randomnumber = generateUUID() 12 | context.setVariable("sessionid",randomnumber); -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/apiproxy/targets/CodeGenrateFlow.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Apigee auto generated target endpoint 4 | 5 | 6 | 7 | http://op101-ex-test.apigee.net/atel/openidconnect/redirect?response_type=code&client_id=rflW6u3ogFMG1V1AwAAnESoEoXfrHO7M 8 | 9 | 2XX, 1XX, 5XX, 4XX 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -Dusername={your-username} -Dpassword={your-password} -Dorg={your-org-name} -P{your-env-name} -------------------------------------------------------------------------------- /src/gateway/identity-oauthv2-api/test/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "createAccessToken":"grant_type=authorization_code&code=3tGK6HTv&client_id=1M996hWk1xQAlzrXzSBMs7pKA3CG2AbD&client_secret=0weRiSjzZ895dA44&redirect_uri=http%3A%2F%2Fdarshan1234-test.apigee.net%2Fidentity_app%2Fcallback", 3 | "host":"http://darshan1234-test.apigee.net", 4 | "genAuthCode":"response_type=code&redirect_uri=http%3A%2F%2Fdarshan1234-test.apigee.net%2Fidentity_app%2Fcallback&scope=openid%20profile%20email&client_id=1M996hWk1xQAlzrXzSBMs7pKA3CG2AbD&userid=darshan%2B1%40apigee.com&nonce=", 5 | "authorizeQueryString":"var qs = 'redirect_uri=http://darshan1234-test.apigee.net/identity_app/callback&client_id=1M996hWk1xQAlzrXzSBMs7pKA3CG2AbD&scope=openid%20profile%20email&response_type=code&state=uyrjiqa23nv8650ndj" 6 | } -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/generate-token.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsc://token.js 4 | jsc://generate-token.js 5 | 6 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/get-identifier-token.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /sms/{identifier}/{token} 5 | 6 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/get-identifier.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /sms/{identifier} 5 | 6 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/get-token-cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Proxy 8 | token_cache_response 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/modify-token-cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Proxy 8 | 9 | 1 10 | 11 | token 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/set-create-response.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | 200 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/set-failure-token-response.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | 400 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/set-sms-payload.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | sender_address 5 | 123456 6 | 7 | 8 | 9 |
10 |
11 |
12 |
13 |
14 | 15 | 16 | 17 | {"outboundSMSMessageRequest":{"address":["tel:%identifier#"],"senderAddress":"tel:%sender_address#","outboundSMSTextMessage":{"message":"%token_text#"}}} 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/set-success-token-response.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | 200 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/set-token-cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Proxy 8 | 9 | 300 10 | 11 | token_challenge 12 | 13 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/policies/verify-api-key.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/resources/jsc/generate-token.js: -------------------------------------------------------------------------------- 1 | var challenge 2 | , payload = JSON.parse(context.getVariable('request.content')); 3 | 4 | if (payload.type === 'magic') { 5 | challenge = '456789'; 6 | } else { 7 | var hash = Token(); 8 | challenge = hash.random({length: payload.length, type: payload.type}); 9 | } 10 | 11 | context.setVariable('token_text', payload.text.replace('{token}', challenge)); 12 | context.setVariable('token_challenge', challenge); 13 | context.setVariable('token_expiry', payload.expiry); -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/apiproxy/targets/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | set-sms-payload 7 | 8 | 9 | 10 | 11 | 12 | http://example.com/smsmessaging/v1/outbound/{sender_address}/requests 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "prod", 5 | "policies": [], 6 | "proxies": [], 7 | "targets": [] 8 | }, 9 | { 10 | "name": "test", 11 | "policies": [], 12 | "proxies": [], 13 | "targets": [] 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /src/gateway/identity-sms-token-api/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -Dusername={your-username} -Dpassword={your-password} -Dorg={your-org-name} -P{your-env-name} -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-api/.gitignore: -------------------------------------------------------------------------------- 1 | #package.json 2 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-api/apiproxy/identity-users.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1396200611233 5 | rkilaparti@apigee.com 6 | 7 | identity-users 8 | 1396200611233 9 | rkilaparti@apigee.com 10 | 11 | 12 | default 13 | 14 | 15 | 16 | 17 | default 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-api/apiproxy/proxies/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /identity-users/v1 5 | default 6 | 7 | 8 | default 9 | 10 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-api/apiproxy/resources/node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "identity-user", 3 | "version": "0.0.1", 4 | "description": "mobile identity user management", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/apigeecs/grass.git" 8 | }, 9 | "keywords": [ 10 | "mobile", 11 | "identity", 12 | "user", 13 | "management" 14 | ], 15 | "author": "Rajiv Kilaparti 2 | 3 | 4 | node://server.js 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-api/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "prod", 5 | "policies": [ 6 | 7 | ], 8 | "proxies": [], 9 | "targets": [] 10 | }, 11 | { 12 | "name": "test", 13 | "policies": [ 14 | ], 15 | "proxies": [], 16 | "targets": [] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-api/config.orig: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "prod", 5 | "policies": [ 6 | 7 | ], 8 | "proxies": [], 9 | "targets": [] 10 | }, 11 | { 12 | "name": "test", 13 | "policies": [ 14 | ], 15 | "proxies": [], 16 | "targets": [] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-api/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -Dusername={your-username} -Dpassword={your-password} -Dorg={your-org-name} -P{your-env-name} 4 | 5 | The node resource for this module can be found at ../identity-usermgmt-node-module 6 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-api/test/test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var request = require('supertest'); 3 | var should = require('should'); 4 | describe('api', function(){ 5 | var url = 'http://darshan1234-test.apigee.net/identity-users/v1'; 6 | describe('POST /users/authenticate', function(){ 7 | it('should authenticate a valid user', function(done){ 8 | var data = {"username":"darshan+1@apigee.com", 9 | "grant_type":"password", 10 | "password":"apigee123" 11 | }; 12 | 13 | request(url) 14 | .post('/users/authenticate') 15 | .send(data) 16 | .end(function (err, res){ 17 | if (err){ 18 | done(err); 19 | } 20 | res.should.have.property('status', 200); 21 | done(); 22 | 23 | }) 24 | 25 | }) 26 | }) 27 | }) 28 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-node-module/modules.xml: -------------------------------------------------------------------------------- 1 | 3 | modules 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consentmgmt/node_modules/ 11 | node_modules 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-node-module/public.xml: -------------------------------------------------------------------------------- 1 | 3 | public 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consentmgmt/public/ 11 | public 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-node-module/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-node-module/routes.xml: -------------------------------------------------------------------------------- 1 | 3 | routes 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | usermgmt/Router/ 11 | Router 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-node-module/usermgmt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "identity-user", 3 | "version": "0.0.1", 4 | "description": "mobile identity user management", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/apigeecs/grass.git" 8 | }, 9 | "keywords": [ 10 | "mobile", 11 | "identity", 12 | "user", 13 | "management" 14 | ], 15 | "author": "Rajiv Kilaparti 3 | views 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | consentmgmt/views/ 11 | views 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/identity-usermgmt-node-module/zip.xml: -------------------------------------------------------------------------------- 1 | 3 | modules 4 | false 5 | 6 | zip 7 | 8 | 9 | 10 | usermgmt/node_modules/ 11 | node_modules 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/include/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/java-callouts/jwt/include/.DS_Store -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/include/commons-codec-1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/java-callouts/jwt/include/commons-codec-1.8.jar -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/include/gson-2.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/java-callouts/jwt/include/gson-2.2.2.jar -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/include/joda-time-2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/java-callouts/jwt/include/joda-time-2.0.jar -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/include/jsontoken-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/java-callouts/jwt/include/jsontoken-1.0.jar -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/src/main/java/com/grass/identity/JwtSign/JWT_Creator.java: -------------------------------------------------------------------------------- 1 | package com.grass.identity.JwtSign; 2 | 3 | import com.apigee.flow.execution.ExecutionContext; 4 | import com.apigee.flow.execution.ExecutionResult; 5 | import com.apigee.flow.execution.IOIntensive; 6 | import com.apigee.flow.execution.spi.Execution; 7 | import com.apigee.flow.message.MessageContext; 8 | 9 | @IOIntensive 10 | public class JWT_Creator implements Execution { 11 | 12 | 13 | public ExecutionResult execute(MessageContext msgCtxt, 14 | ExecutionContext exeCtxt) { 15 | try{ 16 | String SIGNING_KEY =msgCtxt.getVariable("request.formparam.client_secret"); 17 | String AUD = msgCtxt.getVariable("request.formparam.client_id"); 18 | String SUB = msgCtxt.getVariable("userid"); 19 | long AUTH_TIME = Long.parseLong((String) msgCtxt.getVariable("issued_at")); 20 | String ISSUER = msgCtxt.getVariable("issuer"); 21 | String NONCE= msgCtxt.getVariable("nonce"); 22 | String token = null; 23 | 24 | 25 | JWT_Handler handler = new JWT_Handler(SUB, AUD, ISSUER, 26 | AUTH_TIME, SIGNING_KEY, NONCE); 27 | token = handler.getJWT(); 28 | msgCtxt.setVariable("jws", token); 29 | }catch (Exception e) { 30 | e.printStackTrace(); 31 | } 32 | return ExecutionResult.SUCCESS; 33 | } 34 | } -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Fri Nov 14 15:39:53 IST 2014 3 | version=1 4 | groupId=JwtTokenSign 5 | artifactId=jwtTokenSigning 6 | -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com/grass/identity/JwtSign/JWT_Handler.class 2 | com/grass/identity/JwtSign/JWT_Creator.class 3 | -------------------------------------------------------------------------------- /src/gateway/java-callouts/jwt/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | /Users/Muthu/Documents/muthu/git/openidentity/src/gateway/java-callouts/jwt/src/main/java/com/grass/identity/JwtSign/JWT_Handler.java 2 | /Users/Muthu/Documents/muthu/git/openidentity/src/gateway/java-callouts/jwt/src/main/java/com/grass/identity/JwtSign/JWT_Creator.java 3 | -------------------------------------------------------------------------------- /src/gateway/lib/expressions-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/lib/expressions-1.0.0.jar -------------------------------------------------------------------------------- /src/gateway/lib/message-flow-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/lib/message-flow-1.0.0.jar -------------------------------------------------------------------------------- /src/gateway/parent-pom/readme.txt: -------------------------------------------------------------------------------- 1 | build command 2 | -------------- 3 | mvn clean install -Dusername={your-username} -Dpassword={your-password} -Dorg={your-org-name} -P{your-env-name} 4 | 5 | 6 | This will build the entire project with all modules. -------------------------------------------------------------------------------- /src/gateway/setup-identity/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/grass/dd19dbb54107c423a687b720a70ead8c0b2ffb3f/src/gateway/setup-identity/.DS_Store -------------------------------------------------------------------------------- /src/gateway/setup-identity/resources/auth-req-param-cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 3600 5 | 6 | 7 | 1024 8 | 9 | A Cache resource for the prod environment. 10 | 0 11 | 8000 12 | 18000 13 | 1000 14 | true 15 | false 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/setup-identity/resources/consent-session-cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 3600 5 | 6 | 7 | 1024 8 | 9 | A Cache resource for the prod environment. 10 | 0 11 | 8000 12 | 18000 13 | 1000 14 | true 15 | false 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/setup-identity/resources/nonce-cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2592000 5 | 6 | 7 | 1024 8 | 9 | A Cache resource for the prod environment. 10 | 0 11 | 8000 12 | 3000000 13 | 1000 14 | true 15 | false 16 | 17 | -------------------------------------------------------------------------------- /src/gateway/setup-identity/resources/session-cookie-cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 30000 5 | 6 | 7 | 0 8 | 0 9 | 100000 10 | 1000 11 | 512 12 | true 13 | false 14 | 15 | --------------------------------------------------------------------------------