Coverage Report - org.apache.shindig.social.core.oauth.OAuthSecurityToken
 
Classes in this File Line Coverage Branch Coverage Complexity
OAuthSecurityToken
0%
0/16
N/A
1.364
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one
 3  
  * or more contributor license agreements. See the NOTICE file
 4  
  * distributed with this work for additional information
 5  
  * regarding copyright ownership. The ASF licenses this file
 6  
  * to you under the Apache License, Version 2.0 (the
 7  
  * "License"); you may not use this file except in compliance
 8  
  * with the License. You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing,
 13  
  * software distributed under the License is distributed on an
 14  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15  
  * KIND, either express or implied. See the License for the
 16  
  * specific language governing permissions and limitations under the License.
 17  
  */
 18  
 package org.apache.shindig.social.core.oauth;
 19  
 
 20  
 import org.apache.shindig.auth.SecurityToken;
 21  
 
 22  
 public class OAuthSecurityToken implements SecurityToken {
 23  
   private final String userId;
 24  
   private final String appUrl;
 25  
   private final String appId;
 26  
   private final String domain;
 27  
 
 28  0
   public OAuthSecurityToken(String userId, String appUrl, String appId, String domain) {
 29  0
     this.userId = userId;
 30  0
     this.appUrl = appUrl;
 31  0
     this.appId = appId;
 32  0
     this.domain = domain;
 33  0
   }
 34  
 
 35  
   public String getOwnerId() {
 36  0
     return userId;
 37  
   }
 38  
 
 39  
   public String getViewerId() {
 40  0
     return userId;
 41  
   }
 42  
 
 43  
   public String getAppId() {
 44  0
     return appId;
 45  
   }
 46  
 
 47  
   public String getDomain() {
 48  0
     return domain;
 49  
   }
 50  
 
 51  
   public String getAppUrl() {
 52  0
     return appUrl;
 53  
   }
 54  
 
 55  
   // We don't support this concept yet. We probably don't need to as opensocial calls don't
 56  
   // currently depend on the app instance id.
 57  
   public long getModuleId() {
 58  0
     throw new UnsupportedOperationException();
 59  
   }
 60  
 
 61  
   // Not needed for this basic token
 62  
   public String toSerialForm() {
 63  0
     throw new UnsupportedOperationException();
 64  
   }
 65  
 
 66  
   public String getUpdatedToken() {
 67  0
     throw new UnsupportedOperationException();
 68  
   }
 69  
 
 70  
   public String getTrustedJson() {
 71  0
     throw new UnsupportedOperationException();
 72  
   }
 73  
   public boolean isAnonymous() {
 74  0
     return false;
 75  
   }
 76  
 }