The OIDC handler bundle requires a number of external dependencies. The simplest way to install them is to drop an additional provisioning model file the Sling Starter application and rebuild it, for instance at
Code Block language text title oidc.txt
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # [feature name=oidc] [artifacts] net.minidev/accessors-smart/1.2 net.minidev/json-smart/2.3 com.nimbusds/nimbus-jose-jwt/5.12 com.nimbusds/lang-tag/1.4.3 com.nimbusds/oauth2-oidc-sdk/5.62 org.ow2.asm/asm/5.2 org.apache.servicemix.bundles/org.apache.servicemix.bundles.jcip-annotations/1.0_2
- When creating the Sling instance whitelist "org.apache.sling.jcr.api".
- Install the OIDC Handler bundle https://github.com/apache/sling-whiteboard/pull/14
- Install the Sling instance in the Google API. (Refer: https://developers.google.com/identity/protocols/OpenIDConnect)
- callbackURL : "http://localhost:8080/auth/oidc"
- Start the server
- Go to http://localhost:8080/system/console/configMgr
- Select " Google - OpenID Connect Configuration" and fill the required values and save.
- Go to localhost:8080/auth/login
- Then you will be redirected to Google login page. Give your credentials and consent when required.
- If the authentication is successful you will be successfully logged in to Sling.