X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-cass%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fdao%2Fcass%2FOAuthTokenDAO.java;h=a84490d0b169593e94db42ccccc00ad1ec6b64a6;hb=8642116a5232e35904aa82913e5f15157ffbb298;hp=5d0f084b229c07a2430f02532b6ac5240da63f2f;hpb=4b5a7d721d994a49057e9bfb403c7bff1b376660;p=aaf%2Fauthz.git diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/OAuthTokenDAO.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/OAuthTokenDAO.java index 5d0f084b..a84490d0 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/OAuthTokenDAO.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/OAuthTokenDAO.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,19 +44,19 @@ import com.datastax.driver.core.Cluster; import com.datastax.driver.core.Row; /** - * CredDAO manages credentials. + * CredDAO manages credentials. * @author Jonathan * Date: 7/19/13 */ public class OAuthTokenDAO extends CassDAOImpl { public static final String TABLE = "oauth_token"; private AbsCassDAO.PSInfo psByUser; - + public OAuthTokenDAO(AuthzTrans trans, Cluster cluster, String keyspace) { super(trans, OAuthTokenDAO.class.getSimpleName(),cluster, keyspace, Data.class,TABLE, readConsistency(trans,TABLE), writeConsistency(trans,TABLE)); init(trans); } - + public OAuthTokenDAO(AuthzTrans trans, AbsCassDAO aDao) { super(trans, OAuthTokenDAO.class.getSimpleName(),aDao, Data.class, TABLE, readConsistency(trans,TABLE), writeConsistency(trans,TABLE)); init(trans); @@ -73,7 +73,7 @@ public class OAuthTokenDAO extends CassDAOImpl { public String refresh; public Date expires; public long exp_sec; - public String content; + public String content; public Set scopes; public String state; public String req_ip; // requesting @@ -93,7 +93,7 @@ public class OAuthTokenDAO extends CassDAOImpl { OAuthLoader.deflt.marshal(this,new DataOutputStream(baos)); return ByteBuffer.wrap(baos.toByteArray()); } - + @Override public void reconstitute(ByteBuffer bb) throws IOException { OAuthLoader.deflt.unmarshal(this, toDIS(bb)); @@ -107,13 +107,13 @@ public class OAuthTokenDAO extends CassDAOImpl { private static class OAuthLoader extends Loader implements Streamer{ public static final int MAGIC=235677843; public static final int VERSION=1; - public static final int BUFF_SIZE=96; // Note: only used when - + public static final int BUFF_SIZE=96; // Note: only used when + public static final OAuthLoader deflt = new OAuthLoader(KEYLIMIT); public OAuthLoader(int keylimit) { super(keylimit); } - + @Override public Data load(Data data, Row row) { data.id = row.getString(0);